@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Cores Principais - Paleta Verde Floresta e Neon Premium */
  --bg-dark: #030805;
  --bg-deep: #05100a;
  --text-bright: #ffffff;
  --text-primary: #e6f0eb;
  --text-muted: #8ca397;
  --accent-neon: #00ff87;
  --accent-cyan: #00f0ff;
  
  /* Efeito de Vidro (Glassmorphism) */
  --glass-bg: rgba(5, 16, 10, 0.45);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-border-glow: rgba(0, 255, 135, 0.15);
  --glass-blur: 24px;
  
  /* Sombras e Efeitos */
  --shadow-glow: 0 0 30px rgba(0, 255, 135, 0.2);
  --shadow-panel: 0 30px 60px rgba(0, 0, 0, 0.4);
  
  /* Transições */
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* Scrollbar Customizada Premium */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 135, 0.15);
  border-radius: 999px;
  border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 135, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
}

body {
  margin: 0;
  color: var(--text-primary);
  background-color: var(--bg-dark);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  letter-spacing: 0;
}

body.ambient-active {
  overflow: hidden; /* Trava scroll no modo ambiente */
}

/* Ocultar cursor do mouse quando ocioso no modo ambiente */
body.ambient-active.hide-cursor {
  cursor: none;
}

main {
  position: relative;
  z-index: 10;
}

/* Background Animado Global */
#bg-video-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  background-color: var(--bg-dark);
}

.brand-film,
.gif-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
  opacity: 0.95;
  z-index: 1;
  transition: opacity 1.5s ease;
}

.gif-fallback {
  display: none;
}

/* Overlay do vídeo para gerar contraste e cores vibrantes */
.bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(
    circle at center,
    rgba(5, 16, 10, 0.1) 0%,
    rgba(3, 8, 5, 0.6) 70%,
    var(--bg-dark) 100%
  );
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Seção Inicial Fantasma para controle do Scroll */
.scroll-cinema {
  position: relative;
  height: 180vh; /* Altura ideal para a primeira etapa do scroll */
  background: transparent;
  pointer-events: none; /* Deixa passar eventos de clique */
}

.cinema-placeholder {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 80px;
}

/* Indicador sutil de scroll */
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: floatHint 2s infinite ease-in-out;
  opacity: calc(1 - var(--scroll-progress, 0) * 3);
  transition: opacity 0.3s ease;
  pointer-events: auto;
}

.arrow-down {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--accent-neon), transparent);
  position: relative;
  overflow: hidden;
}

.arrow-down::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: var(--text-bright);
  animation: scrollLine 2s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes floatHint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes scrollLine {
  0% { transform: translateY(-20px); }
  80%, 100% { transform: translateY(40px); }
}

/* Estrutura das Seções */
.section {
  position: relative;
  z-index: 2;
  background: transparent;
  margin-bottom: 25vh; /* Espaço para ver o background animado entre painéis */
  transition: var(--transition-smooth);
}

.section:last-of-type {
  margin-bottom: 15vh;
}

/* Estilo Glassmorphic Premium */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-panel);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: var(--glass-border-glow);
  box-shadow: var(--shadow-panel), var(--shadow-glow);
}

.section-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(80px, 12vw, 150px) 0;
}

/* Tipografia */
.section h2 {
  font-family: 'Outfit', sans-serif;
  max-width: 960px;
  margin: 0;
  font-size: clamp(38px, 6.5vw, 92px);
  line-height: 0.96;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-bright) 30%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-lead,
.copy-stack p,
.access p {
  color: var(--text-muted);
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.5;
  font-weight: 400;
}

.section-lead {
  max-width: 780px;
  margin: 34px 0 0;
}

/* Linha de Fluxo Interativo */
.flow-line {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 70px;
  gap: 16px;
}

.flow-line span {
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.flow-line span::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(0, 255, 135, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.flow-line span:hover {
  color: var(--accent-neon);
  border-color: var(--accent-neon);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 255, 135, 0.05);
}

.flow-line span:hover::before {
  transform: translateX(100%);
}

/* Customização de Seções Específicas */
.mission-section.glass-panel {
  background: rgba(3, 8, 5, 0.6);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  gap: clamp(42px, 7vw, 110px);
  align-items: center;
}

.copy-stack {
  display: grid;
  gap: 24px;
}

.copy-stack p {
  margin: 0;
  color: var(--text-muted);
}

.access-section.glass-panel {
  background: linear-gradient(180deg, rgba(5, 16, 10, 0.4) 0%, rgba(3, 8, 5, 0.6) 100%);
}

.access {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.access p {
  max-width: 700px;
  margin: 24px 0 38px;
}

/* Botões e Ações */
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.primary-action.dark {
  color: var(--bg-dark);
  background: var(--accent-neon);
  box-shadow: 0 4px 14px rgba(0, 255, 135, 0.3);
}

.primary-action.dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 135, 0.5);
  background: #00ff9d;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.secondary-action.ghost {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
}

.secondary-action.ghost:hover {
  color: var(--accent-neon);
  border-color: var(--accent-neon);
  transform: translateY(-2px);
}

.call-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 24%, rgba(77, 169, 255, 0.28), transparent 38%),
    radial-gradient(circle at 50% 96%, rgba(50, 145, 255, 0.16), transparent 36%),
    linear-gradient(180deg, #f8fcff 0%, #edf7ff 54%, #dff2ff 100%);
  color: #0b1b3d;
}

.call-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.call-viewport {
  width: min(430px, 100%);
  min-height: min(760px, calc(100vh - 56px));
  display: grid;
  grid-template-rows: auto auto minmax(230px, 1fr) auto auto auto;
  gap: 14px;
  padding: max(20px, env(safe-area-inset-top)) 24px max(20px, env(safe-area-inset-bottom));
  border: 1px solid rgba(96, 150, 205, 0.24);
  border-radius: 38px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 252, 255, 0.82)),
    #ffffff;
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.48),
    0 26px 60px rgba(57, 113, 164, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.82);
  overflow: hidden;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.call-topbar,
.call-context,
.call-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.call-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #10204a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
}

.call-brand svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark {
  position: relative;
  width: 28px;
  height: 18px;
  filter: drop-shadow(0 4px 10px rgba(45, 150, 255, 0.24));
}

.brand-mark::before,
.brand-mark::after {
  content: '';
  position: absolute;
  top: 1px;
  width: 15px;
  height: 15px;
  border: 3px solid #55c6ff;
  border-radius: 50%;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.9);
}

.brand-mark::before {
  left: 0;
}

.brand-mark::after {
  right: 0;
  border-color: #2486ff;
}
}

.brand-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--accent-neon);
  box-shadow: 0 0 24px rgba(0, 255, 135, 0.8);
}

.call-status,
.call-context {
  color: #536a96;
  font-size: 13px;
  font-weight: 650;
}

.employee-stage {
  position: relative;
  min-height: 275px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.signal-ring {
  position: absolute;
  width: 168px;
  aspect-ratio: 1;
  border: 1px solid rgba(43, 143, 255, 0.24);
  border-radius: 999px;
  box-shadow: 0 0 44px rgba(49, 154, 255, 0.12);
  animation: callPulse 3.1s ease-out infinite;
}

.ring-one::before,
.ring-two::before {
  content: '';
  position: absolute;
  inset: 20%;
  border: 1px solid rgba(103, 185, 255, 0.18);
  border-radius: inherit;
}

.ring-two {
  width: 265px;
  animation-delay: 0.7s;
  border-color: rgba(22, 115, 255, 0.28);
}

.employee-avatar {
  position: relative;
  z-index: 2;
  width: clamp(118px, 34vw, 146px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: transparent;
  background:
    radial-gradient(circle at 38% 33%, #ffffff 0%, #bfe8ff 21%, #65bcff 52%, #287df8 100%);
  font-family: 'Outfit', sans-serif;
  font-size: 0;
  font-weight: 900;
  box-shadow:
    inset 0 0 22px rgba(255, 255, 255, 0.92),
    0 24px 64px rgba(46, 145, 255, 0.32),
    0 0 0 14px rgba(70, 170, 255, 0.08);
}

.employee-avatar::before {
  content: '';
  position: absolute;
  width: 74px;
  height: 45px;
  background:
    radial-gradient(circle at 33% 48%, transparent 0 29%, rgba(255, 255, 255, 0.96) 31% 42%, transparent 44%),
    radial-gradient(circle at 67% 48%, transparent 0 29%, rgba(255, 255, 255, 0.96) 31% 42%, transparent 44%);
  filter: drop-shadow(0 3px 10px rgba(28, 115, 255, 0.32));
}

.employee-avatar::after {
  content: '';
  position: absolute;
  width: 69px;
  height: 40px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 31% 49%, transparent 0 33%, rgba(83, 198, 255, 0.62) 34% 39%, transparent 41%),
    radial-gradient(circle at 69% 49%, transparent 0 33%, rgba(29, 118, 255, 0.58) 34% 39%, transparent 41%);
}

.voice-bars {
  position: absolute;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.voice-bars span {
  width: 6px;
  height: 16px;
  border-radius: 999px;
  background: #2d8cff;
  animation: voiceBar 0.9s ease-in-out infinite;
}

.voice-bars span:nth-child(2) { animation-delay: 0.12s; }
.voice-bars span:nth-child(3) { animation-delay: 0.24s; }
.voice-bars span:nth-child(4) { animation-delay: 0.36s; }

.call-active .voice-bars {
  opacity: 1;
}

.call-copy {
  text-align: center;
  padding-top: 30px;
}

.call-role {
  margin: 10px 0 0;
  color: #25365f;
  font-size: 16px;
  font-weight: 650;
  text-transform: none;
}

.call-copy h1 {
  margin: 0;
  color: #071846;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(26px, 8vw, 38px);
  line-height: 1.04;
  font-weight: 760;
}

.call-copy p:last-child {
  max-width: 300px;
  margin: 12px auto 0;
  color: #6a7aa0;
  font-size: 14px;
  line-height: 1.45;
}

.call-context {
  padding: 5px 4px;
  border: 0;
  background: transparent;
}

.voice-notice {
  min-height: 20px;
  color: #536a96;
  font-size: 13px;
  font-weight: 550;
  text-align: center;
}

.call-transcript {
  min-height: 72px;
  max-height: 116px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  padding: 4px 2px;
  scrollbar-width: none;
}

.call-transcript::-webkit-scrollbar {
  display: none;
}

.transcript-line {
  width: fit-content;
  max-width: 82%;
  margin: 0;
  padding: 9px 12px;
  border-radius: 14px;
  color: #14224d;
  font-size: 13px;
  line-height: 1.35;
}

.transcript-line.agent {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(114, 161, 210, 0.18);
  border-top-left-radius: 4px;
  box-shadow: 0 12px 28px rgba(48, 99, 157, 0.08);
}

.transcript-line.user {
  align-self: flex-end;
  color: #ffffff;
  background: linear-gradient(135deg, #2d8cff, #1d68f0);
  border-top-right-radius: 4px;
}

.call-actions {
  justify-content: space-between;
  gap: 8px;
  padding: 12px 0 0;
}

.call-control {
  width: 64px;
  min-height: 70px;
  display: grid;
  grid-template-rows: 46px auto;
  place-items: center;
  border: 0;
  border-radius: 18px;
  color: #1f5fbd;
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.call-control svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.call-control:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.call-control span {
  color: #526991;
  font-size: 11px;
  font-weight: 600;
}

.call-control:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.call-control.secondary {
  background: transparent;
}

.call-control.secondary svg,
.call-control.answer svg,
.call-control.end svg {
  width: 46px;
  height: 46px;
  padding: 12px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(232, 243, 255, 0.78));
  border: 1px solid rgba(107, 158, 210, 0.18);
  box-shadow: 0 10px 24px rgba(47, 104, 169, 0.12);
}

.call-control.answer {
  color: #ffffff;
}

.call-control.answer svg {
  background: linear-gradient(135deg, #5ab7ff, #1976ff);
  box-shadow: 0 14px 34px rgba(38, 129, 255, 0.28);
}

.call-active .call-control.answer {
  display: none;
}

.call-control.end {
  color: #ffffff;
}

.call-control.end svg {
  background: linear-gradient(135deg, #ff766c, #f04d48);
  transform: rotate(135deg);
  box-shadow: 0 15px 34px rgba(241, 92, 84, 0.22);
}

.call-control.end:hover {
  transform: translateY(-2px);
}

.call-control.is-muted svg,
.call-control.is-on svg {
  background: linear-gradient(135deg, #5ab7ff, #1976ff);
  color: #ffffff;
}

.call-ended .employee-avatar {
  filter: grayscale(0.85);
  opacity: 0.72;
}

@keyframes callPulse {
  0% {
    transform: scale(0.72);
    opacity: 0;
  }
  18% {
    opacity: 0.78;
  }
  100% {
    transform: scale(1.62);
    opacity: 0;
  }
}

@keyframes voiceBar {
  0%, 100% { transform: scaleY(0.55); opacity: 0.58; }
  50% { transform: scaleY(1.65); opacity: 1; }
}

/* Botão do Modo Ambiente Flutuante */
#ambient-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(5, 16, 10, 0.7);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: var(--transition-smooth);
}

#ambient-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

#ambient-toggle:hover {
  color: var(--accent-neon);
  border-color: var(--accent-neon);
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-glow);
}

#ambient-toggle:active {
  transform: translateY(0) scale(0.98);
}

/* Estado de Modo Ambiente Ativo */
.ambient-active .section {
  opacity: 0;
  transform: translateY(40px);
  pointer-events: none;
}

.ambient-active .scroll-cinema {
  opacity: 0;
}

/* Efeito do Botão de Toggle quando o Modo Ambiente está ativo */
.ambient-active #ambient-toggle {
  background: rgba(0, 255, 135, 0.12);
  border-color: var(--accent-neon);
  color: var(--accent-neon);
}

/* Esconder o botão no modo embed (URL ?bg=true) */
body.embed-mode #ambient-toggle {
  display: none !important;
}

/* Responsividade */
@media (max-width: 760px) {
  .section {
    margin-bottom: 12vh;
  }

  .cinema-placeholder {
    min-height: 500px;
  }

  .brand-film,
  .gif-fallback {
    inset: 50% auto auto 50%;
    width: 140vw;
    height: auto;
    object-fit: contain;
    transform: translate(-50%, -50%);
  }

  .flow-line {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 40px;
  }

  .flow-line span {
    justify-content: center;
    min-height: 60px;
    border-radius: 12px;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  #ambient-toggle {
    bottom: 16px;
    right: 16px;
    padding: 0 16px;
    font-size: 11px;
  }

  .call-shell {
    padding: 0;
  }

  .call-viewport {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }
}

/* Acessibilidade - Redução de Movimento */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .brand-film {
    display: none;
  }

  .gif-fallback {
    display: block;
  }
  
  #ambient-toggle {
    display: none !important; /* Desativa modo ambiente interativo para evitar loops */
  }
}
