/* =========================================================
   SALU — Motion & Hero Shapes (extension of styles.css)
   Carregado DEPOIS do styles.css em /solucao.
   Regras:
   - formas decorativas SÓ no hero principal
   - reveal on scroll já existe no styles.css
   - count-up nas stats, draw-line no SVG, cascata em listas
   ========================================================= */

/* ─────────── Keyframes compartilhados ─────────── */
@keyframes salu-drawLine { to { stroke-dashoffset: 0; } }
@keyframes salu-pulse { 0%,100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes salu-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes salu-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes salu-growIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes salu-slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ─────────── HERO com formas decorativas ─────────── */
.hero{ padding-top: 120px; }

.hero-shape{
  position: absolute;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  will-change: transform, opacity;
}
.hero-shape.in {
  opacity: 1;
  animation: salu-growIn 0.9s cubic-bezier(0.16,1,0.3,1) both;
}
/* Sunburst grande atrás do phone, girando devagar */
.hero-shape-sunburst{
  width: 280px; height: 280px;
  right: 6%;
  top: 18%;
  opacity: 0;
}
.hero-shape-sunburst.in{
  opacity: 0.85;
  animation: salu-growIn 1.2s 0.3s cubic-bezier(0.16,1,0.3,1) both,
             salu-spin 60s linear infinite 1s;
}
/* Estrela verde pequena — canto inferior esquerdo do phone */
.hero-shape-star{
  width: 72px; height: 72px;
  top: 62%;
  right: 46%;
  left: auto;
}
.hero-shape-star.in{
  opacity: 1;
  animation: salu-growIn 0.8s 0.8s cubic-bezier(0.16,1,0.5,1) both,
             salu-float 4s ease-in-out infinite 1.8s;
}
/* Sparkle lilás — acima do phone, fora da coluna de texto */
.hero-shape-sparkle{
  width: 48px; height: 48px;
  top: 18%;
  right: 38%;
  left: auto;
}
.hero-shape-sparkle.in{
  opacity: 0.75;
  animation: salu-growIn 0.6s 1.2s cubic-bezier(0.16,1,0.5,1) both,
             salu-pulse 3.6s ease-in-out infinite 2s;
}

@media (max-width: 960px){
  .hero-shape-star, .hero-shape-sparkle { display: none; }
  .hero-shape-sunburst { width: 200px; height: 200px; right: -10%; top: 4%; }
}

/* ─────────── PHONE com cascata interna (mocks em iframe) ─────────── */
/* Mock row phone gains a soft ambient glow instead of bezel */
.mock-phone-frame{
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 9/19;
  margin: 0 auto;
  border-radius: 48px;
  background: #14141f;
  padding: 10px;
  box-shadow: 0 24px 60px rgba(20,20,31,0.12), 0 0 0 1px rgba(0,0,0,0.05);
}
.mock-phone-frame iframe{
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 40px;
  background: white;
  display: block;
}

/* Hero phone (larger) */
.hero-phone-wrap{
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 620px;
}
.hero-phone-frame{
  position: relative;
  width: 340px;
  aspect-ratio: 9/19;
  border-radius: 54px;
  background: #14141f;
  padding: 12px;
  box-shadow: 0 40px 80px -20px rgba(64,46,148,0.35), 0 0 0 1px rgba(0,0,0,0.05);
  z-index: 2;
}
.hero-phone-frame iframe{
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 42px;
  background: white;
  display: block;
}
@media (max-width: 960px){
  .hero-phone-wrap{ min-height: 540px; }
  .hero-phone-frame{ width: 280px; }
}

/* ─────────── Count-up stats: tabular alignment ─────────── */
.stat .num{
  font-variant-numeric: tabular-nums;
  display: inline-block;
}

/* ─────────── Pillars — entrance cascade ─────────── */
.pillars .pillar{
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.pillars.in .pillar{
  opacity: 1;
  transform: none;
}
.pillars.in .pillar:nth-child(1){ transition-delay: 0.1s; }
.pillars.in .pillar.pillars-on:nth-child(2),
.pillars.in .pillar:nth-child(2){ transition-delay: 0.22s; }
.pillars.in .pillar:nth-child(3){ transition-delay: 0.34s; }

/* Subtle hover already exists; add accent line on hover */
.pillar{ position: relative; overflow: hidden; }
.pillar::after{
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--text-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.pillar:hover::after{ transform: scaleX(1); }

/* ─────────── Feature rows: phone in a soft "stage" ─────────── */
.feature .mock{
  background: linear-gradient(140deg, #f4effb 0%, #f8f6f1 100%);
  padding: 48px 32px;
  position: relative;
  overflow: hidden;
}
.feature .mock::before{
  content: '';
  position: absolute;
  top: -20%; right: -20%;
  width: 60%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(64,46,148,0.08), transparent 70%);
  pointer-events: none;
}
/* Replay button per mock */
.replay-btn{
  position: absolute;
  top: 16px; right: 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font: 600 11px/1 'Inter', sans-serif;
  color: var(--primary);
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.25s;
  box-shadow: 0 4px 10px rgba(64,46,148,0.08);
}
.feature .mock:hover .replay-btn{ opacity: 1; }

/* ─────────── FORESEE examples: stagger ─────────── */
.foresee-examples{
  position: relative;
  z-index: 1;
}
.foresee-ex{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.foresee-examples.in .foresee-ex:nth-child(1){ opacity: 1; transform: none; transition-delay: 0.2s; }
.foresee-examples.in .foresee-ex:nth-child(2){ opacity: 1; transform: none; transition-delay: 0.35s; }
.foresee-examples.in .foresee-ex:nth-child(3){ opacity: 1; transform: none; transition-delay: 0.5s; }

/* Arrow-in emphasis on → */
.foresee-ex b::before{
  content: '';
  display: inline-block;
  width: 18px; height: 2px;
  background: rgba(255,255,255,0.55);
  vertical-align: middle;
  margin-right: 6px;
  transform-origin: left;
  animation: salu-growIn 0.6s ease-out both;
}

/* ─────────── Dor → Solução (pain list) ─────────── */
.pain-list{
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 56px;
  border-top: 1px solid var(--border);
}
.pain-row{
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.pain-list.in .pain-row{
  opacity: 1;
  transform: none;
}
.pain-list.in .pain-row:nth-child(1){ transition-delay: 0.05s; }
.pain-list.in .pain-row:nth-child(2){ transition-delay: 0.12s; }
.pain-list.in .pain-row:nth-child(3){ transition-delay: 0.19s; }
.pain-list.in .pain-row:nth-child(4){ transition-delay: 0.26s; }
.pain-list.in .pain-row:nth-child(5){ transition-delay: 0.33s; }
.pain-list.in .pain-row:nth-child(6){ transition-delay: 0.4s; }

.pain-index{
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1;
  color: var(--primary);
  opacity: 0.22;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.pain-main{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 860px){
  .pain-row{ grid-template-columns: 1fr; gap: 12px; padding: 32px 0; }
  .pain-index{ font-size: 32px; opacity: 0.3; }
  .pain-main{ grid-template-columns: 1fr; gap: 24px; }
}
.pain-dor p,
.pain-solucao p{
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--primary);
  margin: 0;
}
.pain-dor p{ opacity: 0.75; }
.pain-solucao p b{
  font-weight: 600;
  color: var(--primary);
}
.pain-tag{
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0.55;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(64,46,148,0.07);
}
.pain-tag-solve{
  color: var(--text-accent);
  background: rgba(67,109,70,0.1);
  opacity: 1;
}
.pain-dor, .pain-solucao{
  position: relative;
}

/* ─────────── Personas ─────────── */
.personas.in .persona{
  animation: salu-slideUp 0.7s cubic-bezier(0.16,1,0.3,1) both;
}
.personas.in .persona:nth-child(1){ animation-delay: 0.1s; }
.personas.in .persona:nth-child(2){ animation-delay: 0.2s; }
.personas.in .persona:nth-child(3){ animation-delay: 0.3s; }
.personas.in .persona:nth-child(4){ animation-delay: 0.4s; }
.persona .avatar{
  transition: transform 0.3s cubic-bezier(0.16,1,0.5,1);
}
.persona:hover .avatar{ transform: scale(1.08) rotate(-4deg); }

/* ─────────── Trust badges ─────────── */
.trust-badges.in .trust-badge{
  animation: salu-slideUp 0.6s cubic-bezier(0.16,1,0.3,1) both;
}
.trust-badges.in .trust-badge:nth-child(1){ animation-delay: 0.05s; }
.trust-badges.in .trust-badge:nth-child(2){ animation-delay: 0.12s; }
.trust-badges.in .trust-badge:nth-child(3){ animation-delay: 0.19s; }
.trust-badges.in .trust-badge:nth-child(4){ animation-delay: 0.26s; }
.trust-badges.in .trust-badge:nth-child(5){ animation-delay: 0.33s; }
.trust-badges.in .trust-badge:nth-child(6){ animation-delay: 0.4s; }

/* ─────────── Marquee: slower and softer ─────────── */
.marquee-track{ animation-duration: 55s; }

/* ─────────── Section heads: eyebrow pops first ─────────── */
.section-head .eyebrow{
  opacity: 0;
  transform: translateY(-4px);
  animation: salu-slideUp 0.6s 0.1s cubic-bezier(0.16,1,0.3,1) forwards;
}
.section-head.reveal.in .eyebrow{ animation-delay: 0.1s; }

/* ─────────── Reduced motion ─────────── */
@media (prefers-reduced-motion: reduce){
  .hero-shape.in,
  .hero-phone-frame.in,
  .pillars.in .pillar,
  .foresee-examples.in .foresee-ex,
  .personas.in .persona,
  .trust-badges.in .trust-badge,
  .section-head .eyebrow{
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
