/* ============================================================
   HAGÁ — landing.css
   Estilos específicos da landing page (index.html).
   Consome APENAS tokens do design system v2:
   importar DEPOIS de colors_and_type.css + components.css
   + micro-interactions.css.
   Prefixo .lp-  ·  Motion orquestrado por landing-motion.js
   ============================================================ */

/* ---------------- base ---------------- */
/* box-sizing global: sem isto, .btn-block (width:100% + padding) usa content-box
   e estoura os cards de preço para fora. Mesmo reset das demais páginas do app. */
*, *::before, *::after { box-sizing: border-box; }
.lp-body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-ui); }
.lp-container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.lp-section { padding: var(--space-24) 0; }
.lp-section-alt { background: var(--surface-2); }

.lp-overline {
  font-size: var(--fs-overline); font-weight: 700; letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--primary); margin-bottom: var(--space-3);
}
.lp-h2 {
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h2);
  line-height: var(--lh-snug); letter-spacing: var(--tracking-tight);
  color: var(--fg); margin: 0 0 var(--space-4);
}
.lp-lead { font-size: var(--fs-body-lg); line-height: var(--lh-normal); color: var(--fg-2); max-width: 620px; }

/* ============================================================
   ENTRADAS VIA SCROLL — landing-motion.js adiciona .in-view
   data-animate="up | left | right | fade" · data-delay="150" (ms)
   ============================================================ */
[data-animate] { opacity: 0; transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
[data-animate="up"]    { transform: translateY(24px); }
[data-animate="left"]  { transform: translateX(-32px); }
[data-animate="right"] { transform: translateX(32px); }
[data-animate="fade"]  { transform: none; }
[data-animate].in-view { opacity: 1; transform: translate(0, 0); }

/* ---------------- NAV ---------------- */
.lp-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease-out), border-color .3s, box-shadow .3s;
}
.lp-nav.scrolled {
  background: var(--nav-glass);
  backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.lp-nav-inner { display: flex; align-items: center; gap: var(--space-8); padding: 14px 32px; max-width: 1200px; margin: 0 auto; }
.lp-nav-logo { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; color: var(--fg); }
.lp-nav-logo img { width: 34px; height: 34px; }
.lp-nav-logo span { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.lp-nav-link { font-size: var(--fs-body-sm); font-weight: 600; color: var(--fg-2); text-decoration: none; transition: color var(--dur-fast); }
.lp-nav-link:hover { color: var(--fg); }
@media (max-width: 820px) { .lp-nav-link { display: none; } }

/* ---------------- HERO ---------------- */
.lp-hero {
  position: relative; overflow: hidden;
  padding: 150px 0 100px;
  background:
    radial-gradient(110% 90% at 70% -10%, var(--periwinkle-100) 0%, transparent 55%),
    radial-gradient(90% 80% at 10% 110%, var(--periwinkle-50) 0%, transparent 50%),
    var(--bg);
}
.theme-dark .lp-hero {
  background:
    radial-gradient(110% 90% at 70% -10%, var(--ink-700) 0%, transparent 55%),
    radial-gradient(90% 80% at 10% 110%, var(--periwinkle-900) 0%, transparent 50%),
    var(--bg);
}
.lp-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--space-12); align-items: center; position: relative; }
@media (max-width: 980px) { .lp-hero-grid { grid-template-columns: 1fr; } .lp-hero { padding: 120px 0 70px; } }

.lp-hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border-radius: var(--radius-pill);
  padding: 8px 16px; font-size: var(--fs-caption); font-weight: 600; color: var(--accent);
  box-shadow: var(--shadow-sm); margin-bottom: var(--space-6);
  animation: lp-rise .7s var(--ease-out) both, lp-badge-pulse 2.6s ease-in-out .8s infinite;
}
.lp-hero-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(38px, 5vw, 58px); line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight); margin: 0 0 var(--space-6);
}
.lp-hero-title span { display: block; animation: lp-rise .7s var(--ease-out) both; }
.lp-hero-title span:nth-child(1) { animation-delay: .05s; }
.lp-hero-title span:nth-child(2) { animation-delay: .13s; }
.lp-hero-title span:nth-child(3) { animation-delay: .21s; color: var(--primary); }
.lp-hero-sub {
  font-size: var(--fs-body-lg); line-height: 1.65; color: var(--fg-2);
  max-width: 480px; margin: 0 0 var(--space-8);
  animation: lp-fade .8s var(--ease-out) .45s both;
}
.lp-hero-ctas { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; animation: lp-rise .7s var(--ease-out) .55s both; }
.lp-hero-proof { display: flex; align-items: center; gap: 10px; margin-top: var(--space-8); animation: lp-fade .8s var(--ease-out) .75s both; }
.lp-hero-proof-avatars { display: flex; }
.lp-hero-proof-avatars span {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
}
.lp-hero-proof-avatars span + span { margin-left: -8px; }
.lp-hero-proof small { font-size: var(--fs-caption); color: var(--fg-3); }

.lp-blob { position: absolute; border-radius: 50%; pointer-events: none; }
.lp-blob-a { top: 8%; left: 4%; width: 260px; height: 260px; background: rgba(123,127,232,.14); filter: blur(70px); animation: lp-blob-a 11s ease-in-out infinite; }
.lp-blob-b { bottom: 4%; right: 30%; width: 300px; height: 300px; background: rgba(192,196,255,.2); filter: blur(80px); animation: lp-blob-b 13s ease-in-out infinite; }

/* ---------------- MOCKUP IPHONE ---------------- */
.lp-mock-wrap { display: flex; justify-content: center; animation: lp-mock-in 1s var(--ease-out) .35s both; }
.lp-mock-tilt { transition: transform .25s ease-out; will-change: transform; }
.lp-mock-float { animation: lp-float 5.5s ease-in-out 1.4s infinite; }
.lp-phone {
  width: 320px; height: 660px; border-radius: 56px; padding: 3px; position: relative;
  background: linear-gradient(145deg, #b9bdd4 0%, #71758e 18%, #3a3d52 45%, #8e92ab 72%, #d6d9ea 100%);
  box-shadow: var(--shadow-float), var(--shadow-glow-soft);
}
.lp-phone-btn { position: absolute; width: 3px; background: linear-gradient(180deg, #9ba0b8, #565a72); }
.lp-phone-btn.l1 { left: -2.5px; top: 128px; height: 30px; border-radius: 2px 0 0 2px; }
.lp-phone-btn.l2 { left: -2.5px; top: 176px; height: 58px; border-radius: 2px 0 0 2px; }
.lp-phone-btn.l3 { left: -2.5px; top: 246px; height: 58px; border-radius: 2px 0 0 2px; }
.lp-phone-btn.r1 { right: -2.5px; top: 196px; height: 88px; border-radius: 0 2px 2px 0; }
.lp-phone-body { width: 100%; height: 100%; border-radius: 53px; background: #05060c; padding: 9px; box-sizing: border-box; }
.lp-phone-screen { background: var(--bg); border-radius: 44px; overflow: hidden; position: relative; height: 100%; display: flex; flex-direction: column; }
.lp-island {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 104px; height: 30px; background: #05060c; border-radius: var(--radius-pill); z-index: 6;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; box-sizing: border-box;
}
.lp-island i { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2a3050 0%, #0a0d1a 60%); }
.lp-statusbar {
  position: absolute; top: 16px; left: 0; right: 0; z-index: 5; pointer-events: none;
  display: flex; justify-content: space-between; padding: 0 30px;
  font-size: 13px; font-weight: 700; color: var(--status-fg);
}
.lp-statusbar svg { display: inline-block; vertical-align: middle; }
.lp-glass {
  position: absolute; inset: 0; z-index: 7; pointer-events: none; border-radius: 44px;
  background: linear-gradient(115deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.045) 22%, transparent 40%, transparent 78%, rgba(255,255,255,.06) 100%);
}
.lp-home-indicator {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 118px; height: 5px; border-radius: var(--radius-pill);
  background: var(--fg); opacity: .28; z-index: 6;
}
.lp-screen-hero { padding: 58px 20px 20px; background: var(--atmos); }
.lp-screen-content { padding: 16px 20px 26px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.lp-xp-loop { animation: lp-xp 7s var(--ease-in-out) 1.6s infinite; width: 16%; }
.lp-mock-toast {
  position: absolute; top: 56px; right: 16px; z-index: 8; opacity: 0;
  background: var(--surface); border-radius: var(--radius-pill); padding: 8px 14px;
  font-size: 12px; font-weight: 700; color: var(--gold-400); box-shadow: var(--shadow-float);
  display: flex; align-items: center; gap: 6px;
  animation: lp-toast 7s var(--ease-out) 1.6s infinite;
}
@media (max-width: 980px) {
  .lp-phone { width: 280px; height: 578px; }
  .lp-mock-float { animation: none; }
}

/* ---------------- COMO FUNCIONA ---------------- */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); margin-top: var(--space-12); }
@media (max-width: 820px) { .lp-steps { grid-template-columns: 1fr; } }
.lp-step {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: var(--space-8); box-shadow: var(--shadow-md); position: relative;
}
.lp-step-num {
  position: absolute; top: var(--space-6); right: var(--space-6);
  font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 700;
  color: var(--surface-hover); line-height: 1;
}
.lp-step-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-5);
}
.lp-step-icon svg { width: 24px; height: 24px; }
.lp-step.in-view .lp-step-icon { animation: lp-icon-pop .5s var(--ease-spring) .25s both; }
.lp-step h3 { font-family: var(--font-ui); font-weight: 700; font-size: var(--fs-h4); margin: 0 0 var(--space-2); }
.lp-step p { font-size: var(--fs-body-sm); line-height: var(--lh-normal); color: var(--fg-2); margin: 0; }

/* ---------------- FUNCIONALIDADES (zigue-zague) ---------------- */
.lp-feature { padding: var(--space-16) 0; }
.lp-feature:nth-child(even) { background: var(--surface-2); }
.theme-dark .lp-feature:nth-child(even) { background: var(--bg-deep); }
.lp-feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center; }
.lp-feature-grid.reverse .lp-feature-visual { order: 2; }
@media (max-width: 900px) {
  .lp-feature-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  /* Mobile: no DOM a imagem vem primeiro; forçamos order:2 para o texto (título)
     ser sempre lido ANTES da imagem/preview, em todas as seções. */
  .lp-feature-grid .lp-feature-visual,
  .lp-feature-grid.reverse .lp-feature-visual { order: 2; }
}
.lp-feature-visual { display: flex; justify-content: center; }
.lp-feature h3 {
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3);
  letter-spacing: var(--tracking-tight); line-height: var(--lh-snug); margin: 0 0 var(--space-4);
}
.lp-feature p.desc { font-size: var(--fs-body); line-height: var(--lh-normal); color: var(--fg-2); margin: 0 0 var(--space-6); }
.lp-feature ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.lp-feature li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-body-sm); color: var(--fg-2); line-height: var(--lh-normal); }
.lp-feature li svg { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; margin-top: 2px; }

/* previews de componentes dentro das features */
.lp-preview-card { width: 100%; max-width: 400px; }

/* ---------------- PREÇOS ---------------- */
.lp-pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); max-width: 860px; margin: var(--space-12) auto 0; }
@media (max-width: 820px) { .lp-pricing-grid { grid-template-columns: 1fr; } }
.lp-price-card {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: var(--space-10); box-shadow: var(--shadow-md); position: relative;
}
.lp-price-card.premium { box-shadow: var(--shadow-lg); animation: lp-glow-pulse 3.2s ease-in-out infinite; }
.lp-price-card[data-animate] { transform: translateY(28px) scale(.96); }
.lp-price-card[data-animate].in-view { transform: translateY(0) scale(1); }
.lp-popular {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: var(--fg-on-primary);
  font-size: var(--fs-label); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase;
  padding: 6px 16px; border-radius: var(--radius-pill); box-shadow: var(--shadow-glow-soft);
  white-space: nowrap;
}
.in-view .lp-popular { animation: lp-pop-bounce .6s var(--ease-spring) .4s both; }
.lp-price {
  font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 700; line-height: 1;
  display: flex; align-items: baseline; gap: 6px; margin: var(--space-5) 0; flex-wrap: wrap;
}
.lp-price small { font-family: var(--font-ui); font-size: var(--fs-body-sm); font-weight: 500; color: var(--fg-2); }
.lp-price-card ul { list-style: none; margin: 0 0 var(--space-8); padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.lp-price-card li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-body-sm); color: var(--fg-2); }
.lp-price-card li svg { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; margin-top: 2px; }
.lp-price-card li.off { opacity: .45; }
.lp-price-card li.off svg { color: var(--fg-3); }

/* ---------------- DEPOIMENTOS ---------------- */
.lp-quotes { position: relative; max-width: 720px; margin: var(--space-12) auto 0; min-height: 240px; }
.lp-quote {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  transform: translateY(10px);
  background: var(--surface); border-radius: var(--radius-xl);
  padding: var(--space-10); box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: var(--space-5);
}
.lp-quote.active { opacity: 1; pointer-events: auto; transform: translateY(0); }
.lp-quote blockquote {
  font-family: var(--font-read); font-style: italic; font-size: var(--fs-h4);
  line-height: 1.55; color: var(--fg); margin: 0;
}
.lp-quote-author { display: flex; align-items: center; gap: 12px; }
.lp-quote-author .avatar-sm {
  width: 40px; height: 40px; border-radius: 50%; background: var(--grad-primary);
  color: #fff; font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lp-quote-author strong { font-size: var(--fs-body-sm); color: var(--fg); display: block; }
.lp-quote-author small { font-size: var(--fs-caption); color: var(--fg-3); }
.lp-quote-dots { display: flex; justify-content: center; gap: 8px; margin-top: var(--space-6); }
.lp-quote-dot {
  width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--border-strong); transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-spring);
}
.lp-quote-dot.active { background: var(--primary); transform: scale(1.3); }

/* ---------------- CTA FINAL ---------------- */
.lp-final {
  position: relative; text-align: center; padding: var(--space-24) 0; overflow: hidden;
  background: radial-gradient(70% 90% at 50% 50%, var(--periwinkle-100) 0%, transparent 70%), var(--bg);
}
.theme-dark .lp-final { background: radial-gradient(70% 90% at 50% 50%, var(--periwinkle-900) 0%, transparent 70%), var(--bg); }
.lp-mascot { width: 96px; height: 96px; margin-bottom: var(--space-6); animation: lp-wave 3.4s ease-in-out infinite; transform-origin: 50% 85%; }

/* ---------------- FOOTER ---------------- */
.lp-footer { border-top: 1px solid var(--border); padding: var(--space-10) 0; }
.lp-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; }
.lp-footer small { color: var(--fg-3); font-size: var(--fs-caption); }

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes lp-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes lp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lp-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(123,127,232,.25); }
  50%      { box-shadow: 0 0 0 6px rgba(123,127,232,0); }
}
@keyframes lp-mock-in {
  from { opacity: 0; transform: perspective(1200px) rotateY(-8deg) translateY(48px); }
  to   { opacity: 1; transform: perspective(1200px) rotateY(0deg) translateY(0); }
}
@keyframes lp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes lp-xp {
  0% { width: 16%; } 45% { width: 62%; } 55% { width: 62%; }
  72% { width: 84%; } 92% { width: 84%; } 100% { width: 16%; }
}
@keyframes lp-toast {
  0%, 48%   { opacity: 0; transform: translateY(8px) scale(.95); }
  55%, 82%  { opacity: 1; transform: translateY(0) scale(1); }
  90%, 100% { opacity: 0; transform: translateY(-6px) scale(.97); }
}
@keyframes lp-blob-a { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(26px,-20px) scale(1.08); } }
@keyframes lp-blob-b { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-22px,18px) scale(.94); } }
@keyframes lp-icon-pop {
  0% { transform: scale(.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); }
}
@keyframes lp-glow-pulse {
  0%, 100% { box-shadow: var(--shadow-lg), 0 0 0 1px rgba(123,127,232,.25), 0 0 24px rgba(123,127,232,.18); }
  50%      { box-shadow: var(--shadow-lg), 0 0 0 1px rgba(123,127,232,.5), 0 0 44px rgba(123,127,232,.34); }
}
@keyframes lp-pop-bounce {
  0% { transform: translateX(-50%) scale(0); }
  60% { transform: translateX(-50%) scale(1.15); }
  100% { transform: translateX(-50%) scale(1); }
}
@keyframes lp-wave {
  0%, 100% { transform: rotate(0deg); }
  12% { transform: rotate(-5deg); }
  24% { transform: rotate(4deg); }
  36% { transform: rotate(-2deg); }
  48% { transform: rotate(0deg); }
}

/* ============================================================
   REDUCED MOTION — desativa decorativo, mantém fade simples
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .lp-hero-badge, .lp-hero-title span, .lp-hero-sub, .lp-hero-ctas, .lp-hero-proof,
  .lp-mock-wrap, .lp-mock-float, .lp-blob, .lp-xp-loop, .lp-mock-toast,
  .lp-step.in-view .lp-step-icon, .lp-price-card.premium, .in-view .lp-popular, .lp-mascot {
    animation: none !important;
  }
  .lp-mock-toast { opacity: 1; }
  [data-animate] { transform: none !important; transition: opacity .3s ease !important; }
  .lp-mock-tilt { transition: none; transform: none !important; }
}

/* ---------------- MOBILE: motion mais discreto ---------------- */
@media (max-width: 767px) {
  [data-animate="up"] { transform: translateY(12px); }
  [data-animate="left"], [data-animate="right"] { transform: translateY(12px); }
  .lp-section { padding: var(--space-16) 0; }
  .lp-feature { padding: var(--space-12) 0; }

  /* Depoimentos: no desktop os cards ficam empilhados em position:absolute
     (crossfade). No mobile isso estoura a altura/largura — passamos para fluxo
     normal, mostrando só o card ativo, contido na tela. */
  .lp-quotes { min-height: 0; }
  .lp-quote {
    position: relative; inset: auto; transform: none;
    display: none; max-width: 100%; padding: var(--space-6);
  }
  .lp-quote.active { display: flex; }
  .lp-quote blockquote { font-size: var(--fs-body-lg); overflow-wrap: break-word; }
}
