/* ============================
   HERMES HERO - Celular Animado
   ============================ */

.hero-phone-scene {
  position: relative;
  width: 320px;
  height: 640px;
  perspective: 1200px;
  margin: 0 auto;
  z-index: 15;
  transform: scale(0.85);
  transform-origin: center right;
}

/* Corpo do celular */
.hero-phone {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #1a1a2e 0%, #0f0f1a 100%);
  border-radius: 44px;
  border: 3px solid rgba(255,255,255,0.08);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 30px 80px rgba(0,0,0,0.8),
    0 0 60px rgba(16,185,129,0.15),
    inset 0 1px 0 rgba(255,255,255,0.1);
  overflow: hidden;
  transform-style: preserve-3d;
}

/* Notch */
.hero-phone::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 130px; height: 30px;
  background: #000;
  border-radius: 0 0 18px 18px;
  z-index: 50;
}

/* Tela interna */
.phone-screen {
  position: absolute;
  top: 12px; left: 12px; right: 12px; bottom: 12px;
  background: #0a0a0a;
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Barra de status */
.phone-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  z-index: 10;
}

/* === ESTADO: INCOMING CALL === */
.phone-incoming {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: linear-gradient(180deg, #0d1117 0%, #040d04 100%);
  transition: opacity 0.6s ease;
  z-index: 5;
}

.caller-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; color: #fff; font-weight: 800;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.4);
  animation: avatar-ring 2s ease-in-out infinite;
  margin-bottom: 16px;
}
@keyframes avatar-ring {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  70% { box-shadow: 0 0 0 25px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.caller-name {
  font-size: 26px; font-weight: 700; color: #fff;
  margin-bottom: 4px;
}
.caller-label {
  font-size: 13px; color: rgba(255,255,255,0.7);
  letter-spacing: 0.5px;
  text-align: center;
  padding: 0 20px;
  line-height: 1.4;
  margin-top: 8px;
  animation: pulse-text 2s ease-in-out infinite;
}
@keyframes pulse-text {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Botões de atender/rejeitar */
.call-actions {
  display: flex; gap: 60px;
  margin-top: 50px;
}
.call-btn {
  width: 64px; height: 64px;
  border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff; cursor: pointer;
  transition: transform 0.2s;
}
.call-btn:hover { transform: scale(1.1); }
.call-btn.accept {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 0 20px rgba(16,185,129,0.4);
  animation: btn-glow-green 2s ease-in-out infinite;
}
@keyframes btn-glow-green {
  0%, 100% { box-shadow: 0 0 20px rgba(16,185,129,0.3); }
  50% { box-shadow: 0 0 35px rgba(16,185,129,0.6); }
}
.call-btn.reject {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 0 20px rgba(239,68,68,0.3);
}

/* === ESTADO: CHAMADA ATIVA === */
.phone-active-call {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center;
  padding-top: 80px;
  background: linear-gradient(180deg, #0d1117 0%, #040d04 100%);
  opacity: 0;
  transition: opacity 0.8s ease;
  z-index: 4;
}

.active-call-timer {
  font-size: 14px; color: #10b981;
  font-weight: 600; font-variant-numeric: tabular-nums;
  margin-top: 8px; letter-spacing: 1px;
}

/* Sound wave */
.sound-wave {
  display: flex; align-items: center; justify-content: center;
  gap: 3px; height: 60px; margin-top: 30px;
}
.sound-wave .bar {
  width: 4px; border-radius: 4px;
  background: linear-gradient(to top, #10b981, #34d399);
  animation: wave-bar 0.8s ease-in-out infinite;
}
.sound-wave .bar:nth-child(1) { height: 15px; animation-delay: 0s; }
.sound-wave .bar:nth-child(2) { height: 25px; animation-delay: 0.1s; }
.sound-wave .bar:nth-child(3) { height: 40px; animation-delay: 0.2s; }
.sound-wave .bar:nth-child(4) { height: 55px; animation-delay: 0.15s; }
.sound-wave .bar:nth-child(5) { height: 35px; animation-delay: 0.25s; }
.sound-wave .bar:nth-child(6) { height: 50px; animation-delay: 0.1s; }
.sound-wave .bar:nth-child(7) { height: 20px; animation-delay: 0.3s; }
.sound-wave .bar:nth-child(8) { height: 45px; animation-delay: 0.05s; }
.sound-wave .bar:nth-child(9) { height: 30px; animation-delay: 0.2s; }
.sound-wave .bar:nth-child(10) { height: 15px; animation-delay: 0.35s; }

@keyframes wave-bar {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Chat bubbles na chamada */
.call-transcript {
  width: 85%; margin-top: 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.transcript-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 12px; line-height: 1.5;
  max-width: 90%;
  opacity: 0;
  transform: translateY(10px);
  animation: bubble-in 0.5s ease forwards;
}
.transcript-bubble.hermes {
  background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(16,185,129,0.1));
  border: 1px solid rgba(16,185,129,0.2);
  color: #a7f3d0;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.transcript-bubble.client {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.8);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
@keyframes bubble-in {
  to { opacity: 1; transform: translateY(0); }
}

/* === GLOW RING AROUND PHONE === */
.phone-glow-ring {
  position: absolute;
  top: -20px; left: -20px; right: -20px; bottom: -20px;
  border-radius: 58px;
  border: 1px solid rgba(16,185,129,0.15);
  opacity: 0;
  animation: glow-ring-pulse 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glow-ring-pulse {
  0%, 100% { opacity: 0; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1); }
}

.hermes-talk-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff; font-weight: 800; font-size: 16px;
  border: none; border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(16,185,129,0.5);
  transition: all 0.3s ease;
  position: relative; overflow: hidden;
  animation: mega-pulse 2s infinite;
}
@keyframes mega-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); }
  70% { box-shadow: 0 0 0 20px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.hermes-talk-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 50px rgba(16,185,129,0.8);
  animation: none;
}
.hermes-talk-btn::after {
  content: ''; position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
  animation: btn-shine 2s ease-in-out infinite;
}
@keyframes btn-shine {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

.hermes-talk-btn .mic-icon {
  width: 22px; height: 22px;
  animation: mic-pulse 1s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Responsivo */
@media (max-width: 768px) {
  .hero-phone-scene { transform: scale(0.65); margin-top: -40px; }
}
@media (max-width: 480px) {
  .hero-phone-scene { transform: scale(0.5); margin-top: -80px; }
}

/* Telefone flutuante fixo — muito menor no celular pra ser proporcional à tela.
   Usa !important porque o elemento tem transform inline (scale 0.65). */
@media (max-width: 768px) {
  #floating-phone-wrapper { bottom: 16px !important; left: 12px !important; }
  #floating-hero-phone { transform: scale(0.42) !important; transform-origin: bottom left !important; }
}
@media (max-width: 480px) {
  #floating-phone-wrapper { bottom: 12px !important; left: 8px !important; }
  #floating-hero-phone { transform: scale(0.34) !important; transform-origin: bottom left !important; }
}
