/* =====================================================================
   Edi — página de venda (visual próprio do Edi / CMV Control)
   ===================================================================== */
body { margin: 0; background: #06080E; }
a { color: #8EA8FF; } a:hover { color: #B9C8FF; }
a:focus-visible, button:focus-visible { outline: 2px solid #8EA8FF; outline-offset: 2px; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.grid-bg { background-image: linear-gradient(rgba(142,168,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(142,168,255,0.05) 1px, transparent 1px); background-size: 56px 56px; }
.boot { opacity: 0; animation: fadeIn .35s ease forwards; }
.rise { opacity: 0; transform: translateY(18px); animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards; }
.bubble { opacity: 0; transform: translateY(10px) scale(.97); animation: pop .45s cubic-bezier(.2,.8,.2,1) forwards; }
.typing { animation: blink 1.2s ease-in-out infinite; }
.pulse { animation: blink 2.4s ease-in-out infinite; }
.spin { animation: spin 18s linear infinite; }
.spin-rev { animation: spin 26s linear infinite reverse; }
.flow path { stroke-dasharray: 4 6; animation: flow 1.2s linear infinite; }
.grow { transform-origin: bottom; transform: scaleY(0); animation: growY 1s cubic-bezier(.2,.7,.2,1) forwards; }
.scan { position: absolute; left: 0; right: 0; height: 120px; top: -120px; background: linear-gradient(180deg, transparent, rgba(142,168,255,0.07), transparent); animation: scan 6s linear infinite; pointer-events: none; }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes pop { to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flow { to { stroke-dashoffset: -20; } }
@keyframes growY { to { transform: scaleY(1); } }
@keyframes scan { to { top: 100%; } }
@media (max-width: 860px) {
  .hero-title { font-size: 40px !important; }
  .sec-title { font-size: 30px !important; }
  .pad { padding-left: 20px !important; padding-right: 20px !important; }
}

/* Enquanto a abertura roda, as animações do topo esperam (começam quando ela termina) */
.edi-espera .boot, .edi-espera .rise, .edi-espera .bubble { animation-play-state: paused; }

/* =====================================================================
   ABERTURA: 07:30, o dono manda um áudio e o Edi responde.
   Depois o celular voa até o lugar dele no topo da página.
   ===================================================================== */
.ei { display: none; }
.edi-espera .ei { display: block; position: fixed; inset: 0; z-index: 100; font-family: "Inter", sans-serif; color: #EEF2FA; }
.ei-fundo { position: absolute; inset: 0; background-color: #06080E; }
.ei-palco { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 24px 16px; box-sizing: border-box; }

.ei-fone {
  width: min(300px, 70vw, calc((100svh - 220px) * 0.486));
  aspect-ratio: 9 / 18.5;
  box-sizing: border-box; padding: 12px;
  border-radius: 40px; border: 1px solid #263252; background: #0A0E18;
  box-shadow: 0 0 0 6px #0C111C, 0 30px 90px rgba(110,140,255,0.16);
  opacity: 0; transform: translateY(28px) scale(.96);
  transition: opacity .6s ease, transform .7s cubic-bezier(.2,.7,.2,1);
  will-change: transform, opacity;
}
.ei.f1 .ei-fone { opacity: 1; transform: none; }
.ei-tela { position: relative; height: 100%; border-radius: 28px; overflow: hidden; background: #03050A; display: flex; flex-direction: column; transition: background-color .5s ease; }
.ei.f2 .ei-tela { background: #0B141A; }

/* tela bloqueada: data e hora */
.ei-bloq { position: absolute; left: 0; right: 0; top: 16%; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: opacity .3s ease, transform .4s ease; }
.ei-bloq small { font: 500 11px/1 "JetBrains Mono", monospace; letter-spacing: .14em; color: #9AA5BA; }
.ei-bloq b { font-size: 58px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; }
.ei.f2 .ei-bloq { opacity: 0; transform: translateY(-24px); }

/* conversa */
.ei-topo { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #111B21; border-bottom: 1px solid #1C2A33; opacity: 0; transition: opacity .4s ease .1s; }
.ei.f2 .ei-topo { opacity: 1; }
.ei-av { width: 32px; height: 32px; border-radius: 999px; background: #EEF2FA; color: #06080E; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.ei-topo span { display: flex; flex-direction: column; gap: 1px; }
.ei-topo b { font-size: 14px; font-weight: 600; }
.ei-topo small { font-size: 11px; color: #7FD8B8; }
.ei-msgs { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 9px; padding: 14px 12px 18px; font-size: 13px; line-height: 1.45; }
.ei-m { opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .35s ease, transform .4s cubic-bezier(.2,.8,.2,1); }
.ei-m.on { opacity: 1; transform: none; }
.ei-audio { align-self: flex-end; max-width: 84%; display: flex; flex-direction: column; gap: 6px; padding: 9px 11px; background: #005C4B; border-radius: 12px 12px 4px 12px; }
.ei-onda { display: flex; align-items: center; gap: 8px; }
.ei-onda svg { flex: none; }
.ei-onda span { font: 500 10px/1 "JetBrains Mono", monospace; color: #BFE8DC; }
.ei-audio em { font-style: italic; font-size: 12px; color: #CFEDE4; }
.ei-dig { align-self: flex-start; display: flex; gap: 4px; padding: 11px 12px; background: #1F2C34; border-radius: 12px 12px 12px 4px; }
.ei-dig i { width: 6px; height: 6px; border-radius: 999px; background: #9AA5BA; animation: blink 1s ease-in-out infinite; }
.ei-dig i:nth-child(2) { animation-delay: .15s; }
.ei-dig i:nth-child(3) { animation-delay: .3s; }
.ei-resp { align-self: flex-start; max-width: 88%; padding: 9px 11px; background: #1F2C34; border-radius: 12px 12px 12px 4px; }

.ei-leg { margin: 0; max-width: 30ch; text-align: center; font-size: 18px; line-height: 1.5; color: #B3BDD0; opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
.ei-leg b { color: #EEF2FA; font-weight: 700; }
.ei.f4 .ei-leg { opacity: 1; transform: none; }

.ei-pular {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 16px); right: 16px;
  font: 600 12px/1 "JetBrains Mono", monospace; letter-spacing: .06em;
  color: #EEF2FA; background: rgba(6, 8, 14, .8); border: 1px solid #2A3550; border-radius: 999px;
  padding: 12px 16px; min-height: 44px; cursor: pointer;
}
.ei-pular:hover { border-color: #8EA8FF; }

/* saída: o fundo some e o celular voa para o topo */
.ei.saindo .ei-fundo { opacity: 0; transition: opacity .7s ease; }
.ei.saindo .ei-leg, .ei.saindo .ei-pular { opacity: 0; transition: opacity .25s ease; }
