/* ==========================================================================
   Pipeelo Vendas Dark — Design System
   v2026-05 — Plus Jakarta Sans + JetBrains Mono · Mint #00D2A0
   Used by: index.html + 5 LPs
   ========================================================================== */

:root {
  --bg: #090E17;
  --bg-deep: #060912;
  --surface: #111827;
  --surface-2: #0F1623;
  --border-soft: rgba(255, 255, 255, 0.06);
  --border-mid: rgba(255, 255, 255, 0.10);

  --mint: #00D2A0;
  --mint-hi: #2DD4BF;
  --mint-glow: rgba(0, 210, 160, 0.25);
  --mint-soft: rgba(0, 210, 160, 0.06);

  --purple: #7C3AED;
  --purple-glow: rgba(124, 58, 237, 0.18);

  --text-hi: #F8FAFC;
  --text-mid: #94A3B8;
  --text-low: #64748B;

  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-hi);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: +0.005em;
}
h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}
h1 { font-weight: 800; letter-spacing: -0.03em; line-height: 0.98; font-size: clamp(36px, 7vw, 80px); }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* === EYEBROW === */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint);
  background: rgba(0, 210, 160, 0.05);
  border: 1px solid rgba(0, 210, 160, 0.15);
}
.eyebrow.purple { color: var(--purple); background: rgba(124, 58, 237, 0.06); border-color: rgba(124, 58, 237, 0.18); }
.eyebrow.warn   { color: #F59E0B; background: rgba(245, 158, 11, 0.06); border-color: rgba(245, 158, 11, 0.18); }
.eyebrow.danger { color: #EF4444; background: rgba(239, 68, 68, 0.06); border-color: rgba(239, 68, 68, 0.18); }
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

/* === SCROLLBAR & SELECTION === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0, 210, 160, 0.18); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 210, 160, 0.40); }
::selection { background: var(--mint); color: var(--bg); }

/* === DOUBLE BEZEL === */
.bezel {
  padding: 6px;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border-soft);
  transition: all 600ms var(--ease-spring);
}
.bezel-inner {
  border-radius: calc(var(--r-xl) - 6px);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.bezel:hover {
  border-color: rgba(0, 210, 160, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 210, 160, 0.08);
}
.bezel-sm { padding: 4px; border-radius: var(--r-lg); }
.bezel-sm > .bezel-inner { border-radius: calc(var(--r-lg) - 4px); padding: 22px; }

/* === GLASS === */
.glass {
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border-mid);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.20),
    0 8px 32px rgba(0, 0, 0, 0.30);
}

/* === GRAIN OVERLAY === */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* === BUTTONS === */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: all 300ms var(--ease-spring);
  cursor: pointer;
  will-change: transform;
  min-height: 48px;
}
.btn-pill .icon-wrap {
  width: 36px; height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 300ms var(--ease-spring);
}
.btn-pill:hover .icon-wrap { transform: translate(2px, -1px) scale(1.05); }
.btn-pill:active { transform: scale(0.98); }
.btn-primary {
  background: var(--mint);
  color: var(--bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    0 0 0 1px rgba(0, 210, 160, 0.40),
    0 8px 24px rgba(0, 210, 160, 0.20);
}
.btn-primary:hover {
  background: var(--mint-hi);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    0 0 0 1px rgba(0, 210, 160, 0.60),
    0 12px 36px rgba(0, 210, 160, 0.35);
}
.btn-primary .icon-wrap { background: rgba(0, 0, 0, 0.20); color: var(--bg); }
.btn-ghost {
  color: var(--text-hi);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-mid);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); }
.btn-ghost .icon-wrap { background: rgba(0, 210, 160, 0.10); color: var(--mint); }

/* === MESH GRADIENT === */
.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.mesh-bg::before, .mesh-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  will-change: transform;
}
.mesh-bg::before {
  width: 720px; height: 720px;
  top: -200px; right: -100px;
  background: radial-gradient(circle, rgba(0, 210, 160, 0.30) 0%, transparent 70%);
  animation: mesh-drift-1 24s var(--ease-smooth) infinite;
}
.mesh-bg::after {
  width: 600px; height: 600px;
  bottom: -180px; left: -120px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.18) 0%, transparent 70%);
  animation: mesh-drift-2 32s var(--ease-smooth) infinite;
}
@keyframes mesh-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%     { transform: translate(-60px, 40px) scale(1.08); }
}
@keyframes mesh-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%     { transform: translate(80px, -50px) scale(0.94); }
}

/* === REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  filter: blur(8px);
  transition: opacity 900ms var(--ease-spring), transform 900ms var(--ease-spring), filter 900ms var(--ease-spring);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }
.reveal-delay-5 { transition-delay: 400ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; }
  .mesh-bg::before, .mesh-bg::after { animation: none; }
}

/* === HAIRLINE === */
.hairline {
  height: 1px;
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, rgba(0, 210, 160, 0.20) 50%, transparent);
}

/* === KPI === */
.kpi-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.04em;
}

/* === NAV PILL === */
.nav-pill {
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: rgba(9, 14, 23, 0.65);
  border: 1px solid var(--border-mid);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.40);
}

/* === FAQ === */
details.faq summary {
  list-style: none;
  cursor: pointer;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary i { transition: transform 300ms var(--ease-spring); }
details.faq[open] summary i { transform: rotate(45deg); }
details.faq .answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms var(--ease-spring);
}
details.faq[open] .answer { max-height: 600px; }

/* === FORMS === */
.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-hi);
  transition: all 250ms var(--ease-spring);
  font-family: inherit;
  font-size: 16px; /* 16px prevents iOS Safari auto-zoom on focus */
  min-height: 48px; /* matches .btn-pill height */
  line-height: 1.4;
}
.form-input::placeholder { color: var(--text-low); }
.form-input:focus {
  outline: none;
  border-color: rgba(0, 210, 160, 0.50);
  background: rgba(255, 255, 255, 0.04);
}
.form-label {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-low);
  margin-bottom: 8px;
}

/* === VIDEO === */
.video-container {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  aspect-ratio: 16/9;
}
.video-container video, .video-container iframe {
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
}
.video-play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 78px; height: 78px;
  border-radius: 50%;
  background: var(--mint);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 300ms var(--ease-spring);
  box-shadow: 0 0 0 1px rgba(0,210,160,0.40), 0 8px 32px rgba(0,210,160,0.30);
}
.video-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 0 0 1px rgba(0,210,160,0.60), 0 12px 48px rgba(0,210,160,0.45);
}
.video-play-btn svg { width: 28px; height: 28px; fill: var(--bg); margin-left: 4px; }

/* === ALERT STACK (rotating cards — used in LP Churn hero) === */
.alert-stack {
  position: relative;
  width: 100%;
  min-height: 460px;
}
.alert-stack-card {
  position: absolute;
  inset: 0 32px 32px 0;
  transition: transform 700ms var(--ease-spring), opacity 700ms var(--ease-spring), filter 500ms var(--ease-spring);
  cursor: pointer;
  will-change: transform, opacity;
}
.alert-stack-card.pos-0 {
  z-index: 3;
  transform: translate(0, 0) scale(1);
  opacity: 1;
  filter: blur(0);
}
.alert-stack-card.pos-1 {
  z-index: 2;
  transform: translate(20px, 20px) scale(0.97);
  opacity: 0.55;
  filter: blur(0.5px);
}
.alert-stack-card.pos-2 {
  z-index: 1;
  transform: translate(40px, 40px) scale(0.94);
  opacity: 0.30;
  filter: blur(1px);
}
.alert-stack-card:not(.pos-0):hover {
  opacity: 0.85;
  transform: translate(20px, 20px) scale(0.99);
  filter: blur(0);
}
.alert-stack-card.pos-2:hover {
  transform: translate(40px, 40px) scale(0.96);
}

/* === SCENARIO TABS (alternating WhatsApp mockups — LP Pós-Venda) === */
.scenario-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  max-width: 100%;
}
.scenario-tab {
  padding: 8px 16px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 280ms var(--ease-spring);
  background: transparent;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.scenario-tab:hover { color: var(--text-hi); }
.scenario-tab.is-active {
  background: var(--mint);
  color: var(--bg);
  box-shadow: 0 0 0 1px rgba(0, 210, 160, 0.40);
}
.scenario-tab .progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}
.scenario-tab.is-active .progress-dot {
  animation: pulse 1.5s ease-in-out infinite;
  opacity: 1;
}
.scenario-stage {
  position: relative;
}
.scenario-stage > .scenario {
  transition: opacity 500ms var(--ease-spring);
}
.scenario-stage > .scenario:not(.is-active) {
  display: none;
}

/* === MOBILE === */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 350ms var(--ease-spring);
}
.mobile-menu.open { transform: translateX(0); }

/* === Z-INDEX === */
.z-mesh { z-index: 0; }
.z-content { z-index: 10; }
.z-nav { z-index: 50; }
.z-grain { z-index: 60; }
.z-modal { z-index: 100; }

/* === UTILITY === */
section { padding-top: clamp(64px, 8vh, 140px); padding-bottom: clamp(64px, 8vh, 140px); }
.hl { color: var(--mint); }
.hl-hi { color: var(--text-hi); font-weight: 600; }

/* === MOBILE RESPONSIVE FIXES === */

/* Touch targets — minimum 44x44 (Apple HIG) */
button, a.btn-pill { min-height: 44px; }
.btn-pill { padding-top: 8px; padding-bottom: 8px; }

/* Phone mockups — scale-down on tight viewports */
@media (max-width: 380px) {
  .phone-mockup-shell { transform: scale(0.92); transform-origin: top center; }
}

/* Alert stack — single card on mobile (no perspective) */
@media (max-width: 1023px) {
  .alert-stack { min-height: 0; height: auto; }
  .alert-stack-card {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    margin-bottom: 16px;
  }
  .alert-stack-card:not(.pos-0) { display: none; }
  .alert-stack-card.pos-0 { display: block; }
}

/* Bezel padding tablet (entre mobile e desktop) — Fix #5 do plano de revisão final */
@media (max-width: 1023px) and (min-width: 641px) {
  .bezel-inner { padding: 24px; }
  .bezel-sm > .bezel-inner { padding: 20px; }
}

/* Bezel padding compactado em telas pequenas */
@media (max-width: 640px) {
  .bezel-inner { padding: 22px; }
  .bezel-sm > .bezel-inner { padding: 18px; }
}

/* Mobile menu sticky bottom CTA helper (LPs sem menu) */
.lp-mobile-cta-bar {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 50;
  display: none;
}
@media (max-width: 767px) {
  .lp-mobile-cta-bar { display: block; }
  .lp-mobile-cta-bar .btn-pill {
    width: 100%;
    justify-content: center;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.30),
      0 0 0 1px rgba(0,210,160,0.40),
      0 16px 40px rgba(0,210,160,0.30);
  }
  /* Avoid sticky CTA covering footer content */
  body { padding-bottom: 88px; }
}

/* Mesh-bg perf — desliga animation em mobile pra economizar GPU/bateria */
@media (max-width: 767px) {
  .mesh-bg::before, .mesh-bg::after {
    animation: none;
    opacity: 0.22;
    filter: blur(80px);
  }
}

/* Phone mockup responsivo — encaixa em viewports estreitos */
.phone-mockup-shell {
  width: min(320px, calc(100vw - 32px));
}

/* Carousel de agentes (index) — scroll-snap pra mobile */
@media (max-width: 1023px) {
  .agent-carousel { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .agent-carousel > * { scroll-snap-align: start; }
}

/* Hero kpi grid — altura uniforme dos 4 cards (Fix #1 da revisão final) */
.hero-kpi-grid .bezel-sm > .bezel-inner {
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Hero kpi grid em mobile — full width cards mais legíveis */
@media (max-width: 480px) {
  .hero-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  .hero-kpi-grid > * {
    grid-column: span 1 !important;
  }
  .hero-kpi-grid .bezel-sm > .bezel-inner { padding: 14px 16px; min-height: 92px; }
  .hero-kpi-grid .kpi-num {
    font-size: clamp(20px, 6.5vw, 30px) !important;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hero-kpi-grid .text-\[11px\] { font-size: 10px; }
}

/* Alert stack — apertar padding em mobile pra não estourar */
@media (max-width: 480px) {
  .alert-stack-card .bezel-inner > .px-6 { padding-left: 16px; padding-right: 16px; }
  .alert-stack-card .bezel-inner > .px-5 { padding-left: 14px; padding-right: 14px; }
  .alert-stack-card .py-5 { padding-top: 14px; padding-bottom: 14px; }
  .alert-stack-card .py-4 { padding-top: 12px; padding-bottom: 12px; }
}

/* Container padding — coerente entre tablet e mobile */
@media (max-width: 640px) {
  section .max-w-\[1280px\], section .max-w-\[1080px\] { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 480px) {
  section .max-w-\[1280px\], section .max-w-\[1080px\] { padding-left: 16px; padding-right: 16px; }
}

/* Form mobile */
@media (max-width: 640px) {
  form .grid.grid-cols-2 { grid-template-columns: 1fr; }
}

/* Nav pill — compactar em mobile */
@media (max-width: 640px) {
  nav .nav-pill { padding: 8px 12px; }
  nav .nav-pill img { height: 24px; }
}

/* Pulse for alert-style elements */
@keyframes alert-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50%      { box-shadow: 0 0 0 12px rgba(239,68,68,0); }
}
.alert-pulse { animation: alert-pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
