/*
  ZapBot — Landing page
  Estilos específicos da página inicial. Tokens de cor/tipografia/botões
  compartilhados ficam em assets/css/theme.css (carregado antes deste arquivo).
*/

body {
  overflow-x: hidden;
  min-height: 100dvh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 600px at 15% -10%, rgba(46,204,143,0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(83,189,235,0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ambient drifting glow, sits above ::before, below content */
.ambient-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient-glow span {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}
.ambient-glow span:nth-child(1) {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(46,204,143,0.16), transparent 70%);
  top: -140px; left: -100px;
  animation: driftA 22s ease-in-out infinite;
}
.ambient-glow span:nth-child(2) {
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(83,189,235,0.12), transparent 70%);
  top: 20%; right: -120px;
  animation: driftB 26s ease-in-out infinite;
}
.ambient-glow span:nth-child(3) {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(46,204,143,0.10), transparent 70%);
  bottom: -100px; left: 30%;
  animation: driftC 30s ease-in-out infinite;
}
@keyframes driftA {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(60px, 50px) scale(1.12); }
}
@keyframes driftB {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-50px, 40px) scale(1.08); }
}
@keyframes driftC {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- NAV ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(10,15,13,0.72);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  min-height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(155deg, var(--signal) 0%, var(--signal-dim) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px -4px rgba(46,204,143,0.55);
  flex-shrink: 0;
  animation: glowPulse 3.2s ease-in-out infinite;
}
.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-6);
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 500;
  transition: color var(--dur-fast) var(--ease-out);
  padding: var(--space-2) 0;
}
.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: var(--space-3); }

.btn-primary svg { transition: transform var(--dur-fast) var(--ease-out); }
.btn-primary:hover svg { transform: translateX(3px); }

.nav-links-mobile-toggle {
  display: flex;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  color: var(--text);
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-links-mobile-toggle { display: none; }
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  background: rgba(10,15,13,0.96);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  padding: 12px 4px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }

/* ---------- HERO ---------- */
.hero {
  padding-block: var(--space-7) var(--space-8);
  position: relative;
}
.hero-grid {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--space-8); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(46,204,143,0.09);
  border: 1px solid rgba(46,204,143,0.28);
  color: var(--signal-strong);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal-strong);
  box-shadow: 0 0 0 4px rgba(46,204,143,0.18);
}

.hero h1 { font-size: clamp(2.25rem, 5.2vw, 3.6rem); color: var(--text); }
.hero h1 .accent {
  background: linear-gradient(100deg, var(--signal-strong), var(--tick));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  margin-top: var(--space-4);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--text-muted);
  max-width: 46ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.hero-proof {
  margin-top: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-faint);
  font-size: 0.85rem;
}
.avatars { display: flex; }
.avatars span {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  margin-left: -8px;
  background: linear-gradient(135deg, var(--surface-2), var(--signal-dim));
}
.avatars span:first-child { margin-left: 0; }

/* ---------- PHONE MOCKUP (signature element) ---------- */
.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 900px;
}
.phone-float { animation: floatY 5s ease-in-out infinite; }
.phone {
  width: min(340px, 100%);
  background: linear-gradient(160deg, #10201A, #0B1613);
  border: 1px solid var(--border-strong);
  border-radius: 34px;
  padding: 14px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02) inset;
  transform-style: preserve-3d;
  transition: transform 300ms var(--ease-out);
  will-change: transform;
}
.phone-notch {
  width: 80px; height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  margin: 0 auto 10px;
}
.phone-screen {
  background: var(--surface);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.chat-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--signal), var(--signal-dim));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-title { font-size: 0.92rem; font-weight: 600; }
.chat-status { font-size: 0.74rem; color: var(--signal-strong); display: flex; align-items: center; gap: 5px; }
.chat-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal-strong); }

.chat-body {
  padding: 16px;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  animation: bubbleIn 420ms var(--ease-out) forwards;
}
.bubble.in {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.bubble.out {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--signal-dim), var(--signal));
  color: #04140D;
  border-bottom-right-radius: 4px;
}
.bubble .meta {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.66rem;
  opacity: 0.7;
}
.bubble.in .meta { color: var(--text-faint); }
.bubble .audio-row { display: flex; align-items: center; gap: 8px; }
.audio-wave { display: flex; align-items: center; gap: 2px; height: 16px; }
.audio-wave span {
  width: 2px; background: var(--text-muted); border-radius: 2px;
  animation: wave 900ms ease-in-out infinite;
}
.bubble.in .audio-wave span { background: var(--signal-strong); }

@keyframes bubbleIn { to { opacity: 1; transform: translateY(0); } }
@keyframes wave {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

.typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 10px 13px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  opacity: 0;
  animation: bubbleIn 300ms var(--ease-out) forwards;
  animation-delay: 1.6s;
}
.typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-faint);
  animation: bounce 1.1s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.tick { transition: color var(--dur-med) var(--ease-out); }
.tick.blue { color: var(--tick) !important; opacity: 1 !important; }

/* ---------- STATS ---------- */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-block: var(--space-5);
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  text-align: center;
}
.stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  color: var(--text);
}
.stat-label { color: var(--text-faint); font-size: 0.82rem; margin-top: 4px; }

/* ---------- SECTION HEADER ---------- */
.section { padding-block: var(--space-8); }
.section-head { max-width: 620px; margin-bottom: var(--space-7); }
.section-eyebrow {
  color: var(--signal-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  display: block;
}
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); color: var(--text); }
.section-head p { margin-top: var(--space-3); color: var(--text-muted); font-size: 1.02rem; }

/* ---------- FEATURES BENTO ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.bento .card { padding: var(--space-5); }
.bento .card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  background: var(--surface-2);
}
.bento .card .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(46,204,143,0.10);
  border: 1px solid rgba(46,204,143,0.22);
  display: flex; align-items: center; justify-content: center;
  color: var(--signal-strong);
  margin-bottom: var(--space-4);
}
.bento .card h3 { font-size: 1.08rem; margin-bottom: 8px; color: var(--text); }
.bento .card p { color: var(--text-muted); font-size: 0.92rem; }
.bento .card.span-2 { grid-column: span 2; }

@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .card.span-2 { grid-column: span 2; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .bento .card.span-2 { grid-column: span 1; }
}

/* ---------- HOW IT WORKS ---------- */
.steps { display: grid; gap: var(--space-5); }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  position: relative;
  padding: var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), transparent);
}
.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--signal-strong);
  border: 1px solid rgba(46,204,143,0.3);
  background: rgba(46,204,143,0.08);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  margin-bottom: var(--space-4);
}
.step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.92rem; }
@media (min-width: 860px) {
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 32px; right: -28px;
    width: 24px; height: 1px;
    background: repeating-linear-gradient(90deg, var(--border-strong) 0 6px, transparent 6px 10px);
  }
}

/* ---------- SEGMENTS ---------- */
.segments-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.segments-track {
  display: flex;
  gap: var(--space-2);
  width: max-content;
  animation: marquee 32s linear infinite;
}
.segments-marquee:hover .segments-track { animation-play-state: paused; }

/* ---------- FINAL CTA ---------- */
.cta-final {
  margin-inline: var(--space-4);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-5);
  text-align: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse 700px 400px at 50% 0%, rgba(46,204,143,0.18), transparent 70%), var(--surface);
  border: 1px solid var(--border-strong);
}
@media (min-width: 768px) { .cta-final { margin-inline: var(--space-6); } }
.cta-final h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); max-width: 22ch; margin-inline: auto; }
.cta-final p { color: var(--text-muted); max-width: 52ch; margin: var(--space-3) auto var(--space-6); }
.cta-final .hero-cta { justify-content: center; }

/* ---------- FOOTER ---------- */
footer { border-top: 1px solid var(--border); padding-block: var(--space-6); }
.footer-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
  color: var(--text-faint);
  font-size: 0.86rem;
}
@media (min-width: 640px) {
  .footer-row { flex-direction: row; justify-content: space-between; align-items: center; }
}

.hero-anim {
  opacity: 0;
  animation: riseIn 700ms var(--ease-out) forwards;
  animation-delay: var(--d, 0ms);
}

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--signal), var(--tick));
  z-index: 60;
  transition: width 80ms linear;
}

.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

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