/* ===== BRANCH PAGES STYLES (WebLab, Cobra, Growth, AI Studio) ===== */

/* ========== ANIMAÇÕES CINEMATOGRÁFICAS ========== */

/* Estado inicial - esconde elementos antes da animação */
.hero--branch {
  position: relative;
  overflow: hidden;
}

/* Esconde imediatamente todos os elementos ao carregar */
.hero--branch .hero__logo,
.hero--branch .hero__title,
.hero--branch .hero__subtitle,
.hero--branch .hero__cta {
  opacity: 0;                       /* começa invisível */
  transform: translateY(14px);      /* leve deslocamento inicial */
  transition: opacity 2s ease, transform 2s ease; /* suaviza entrada */
}

/* Quando a classe .reveal-in for adicionada, aparecem suavemente */
.hero--branch.reveal-in .hero__logo,
.hero--branch.reveal-in .hero__title,
.hero--branch.reveal-in .hero__subtitle,
.hero--branch.reveal-in .hero__cta {
  opacity: 1;
  transform: translateY(0);
}

/* Esconder apenas se JS estiver pronto para animar */
.js-ready .hero--branch:not(.reveal-in) .hero__logo,
.js-ready .hero--branch:not(.reveal-in) .hero__title,
.js-ready .hero--branch:not(.reveal-in) .hero__subtitle,
.js-ready .hero--branch:not(.reveal-in) .hero__cta {
  opacity: 0;
}

/* Quando mounted, elementos ficam prontos para animar */
.is-mounted .hero--branch.reveal-in .hero__logo {
  animation: fadeInScale 4200ms cubic-bezier(0.22, 1, 0.36, 1) 200ms forwards;
}

.is-mounted .hero--branch.reveal-in .hero__title {
  animation: fadeInUp 4400ms cubic-bezier(0.22, 1, 0.36, 1) 400ms forwards;
}

.is-mounted .hero--branch.reveal-in .hero__subtitle {
  animation: fadeInUp 4600ms cubic-bezier(0.22, 1, 0.36, 1) 600ms forwards;
}

.is-mounted .hero--branch.reveal-in .hero__cta .btn:nth-child(1) {
  animation: fadeInUp 4800ms cubic-bezier(0.22, 1, 0.36, 1) 800ms forwards;
}

.is-mounted .hero--branch.reveal-in .hero__cta .btn:nth-child(2) {
  animation: fadeInUp 5000ms cubic-bezier(0.22, 1, 0.36, 1) 1000ms forwards;
}

/* Light sweep effect */
.hero--branch::before {
  content: '';
  position: absolute;
  top: 0;
  left: -35%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(59,130,246,0) 0%, rgba(59,130,246,0.18) 50%, rgba(34,211,238,0) 100%);
  filter: blur(26px);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.is-mounted .hero--branch.reveal-in::before {
  animation: lightSweep 2500ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Keyframes */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lightSweep {
  0% {
    opacity: 0.8;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(135%);
  }
}

/* Respeitar prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hero--branch .hero__logo,
  .hero--branch .hero__title,
  .hero--branch .hero__subtitle,
  .hero--branch .hero__cta {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  
  .hero--branch::before {
    display: none !important;
  }
}

/* ========== IDENTIDADES VISUAIS POR BRAÇO ========== */

/* WebLab - Ciano claro */
.hero--weblab {
  background: radial-gradient(circle at 30% 40%, rgba(34, 211, 238, 0.12) 0%, transparent 60%),
              radial-gradient(circle at 70% 60%, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
}

.hero--weblab::before {
  background: linear-gradient(120deg, rgba(34,211,238,0) 0%, rgba(34,211,238,0.22) 50%, rgba(59,130,246,0) 100%);
}

/* Cobra - Azul profundo com halo concentrado */
.hero--cobra {
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 60%),
              radial-gradient(circle at 30% 70%, rgba(34, 211, 238, 0.08) 0%, transparent 50%);
}

.hero--cobra::before {
  background: linear-gradient(120deg, rgba(59,130,246,0) 0%, rgba(59,130,246,0.22) 50%, rgba(34,211,238,0) 100%);
  filter: blur(30px);
}

/* Growth - Gradiente azul → ciano com micro grãos */
.hero--growth {
  background: 
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 1px),
    radial-gradient(circle at 40% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 60%),
    radial-gradient(circle at 60% 70%, rgba(34, 211, 238, 0.08) 0%, transparent 60%);
  background-size: 32px 32px, 100% 100%, 100% 100%;
}

/* AI Studio - Azul elétrico com particles */
.hero--aistudio {
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.12) 0%, transparent 60%);
  position: relative;
}

.hero--aistudio::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 15%;
  width: 4px;
  height: 4px;
  background: rgba(34, 211, 238, 0.6);
  border-radius: 50%;
  box-shadow: 
    -100px 50px 0 rgba(59, 130, 246, 0.4),
    120px -30px 0 rgba(34, 211, 238, 0.5),
    -80px -60px 0 rgba(59, 130, 246, 0.3);
  animation: particleFloat 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes particleFloat {
  0%, 100% { 
    transform: translateY(0) scale(1); 
    opacity: 0.6;
  }
  50% { 
    transform: translateY(-10px) scale(1.1); 
    opacity: 0.8;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero--aistudio::after {
    animation: none !important;
  }
}

/* ========== HERO LOGO ========== */
.hero__logo {
  width: 120px;
  height: auto;
  margin: 0 auto 2rem;
  display: block;
  position: relative;
  z-index: 2;
}

@media (max-width: 767px) {
  .hero__logo {
    width: 90px;
  }
}

/* ========== FEATURES SECTION ========== */
.features {
  padding: var(--section-padding) 0;
  background: rgba(255, 255, 255, 0.01);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ring-light);
  border-radius: 16px;
  padding: 2rem;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--ring);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-elevated);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature-card__description {
  color: var(--muted);
  line-height: 1.6;
}

/* ========== PROCESS SECTION ========== */
.process--branch {
  padding: var(--section-padding) 0;
}

.process__timeline {
  position: relative;
  max-width: 800px;
  margin: 3rem auto 0;
}

.timeline-item {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 50px;
  width: 2px;
  height: calc(100% + 1rem);
  background: var(--ring-light);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-item__number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  position: relative;
  z-index: 2;
}

.timeline-item__content h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-item__content p {
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 767px) {
  .timeline-item {
    gap: 1rem;
  }
  
  .timeline-item__number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .timeline-item::before {
    left: 19px;
  }
}

/* ========== CTA SECTION ========== */
.cta-section {
  padding: var(--section-padding) 0;
  text-align: center;
}

.cta-section__card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ring-light);
  border-radius: 20px;
  padding: 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.1);
}

.cta-section__title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-section__subtitle {
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.cta-section__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .cta-section__card {
    padding: 3rem 1.5rem;
  }
  
  .cta-section__title {
    font-size: 2rem;
  }
  
  .cta-section__buttons {
    flex-direction: column;
    align-items: center;
  }
}
/* ========== BOTÃO COM FEIXE LUMINOSO ========== */

/* Botão primário dos braços com feixe */
.hero--branch .btn--primary {
  position: relative;
  background: transparent;
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--text);
  overflow: hidden;
  z-index: 1;
}

/* Feixe luminoso animado (borda que gira) */
.hero--branch .btn--primary::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: conic-gradient(
   from 0deg,
    transparent 0deg,
    transparent 210deg,           /* ← Começar bem mais cedo */
    rgba(34, 211, 238, 0.8) 240deg,
    rgba(59, 130, 246, 0.6) 330deg,
    rgba(34, 211, 238, 0.4) 360deg,
    transparent 360deg

  );
  border-radius: inherit;
  animation: rotateBorder 4s linear infinite;
  z-index: -1;
  filter: blur(12px);
  opacity: 1;
}

/* Fundo interno do botão (esconde o gradiente no meio) */
.hero--branch .btn--primary::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  bottom: 1px;
  background: rgba(9, 9, 11, 0.95);
  border-radius: inherit;
  z-index: -1;
}

/* Hover: para a animação e mostra contorno completo */
.hero--branch .btn--primary:hover::before {
  animation-play-state: paused;
  background: linear-gradient(
    200deg,
    rgba(34, 211, 238, 0.6) 0%,
    rgba(59, 130, 246, 0.5) 50%,
    rgba(34, 211, 238, 0.6) 100%
  );
  filter: blur(6px);
}

/* Glow externo no hover */
.hero--branch .btn--primary:hover {
  box-shadow: 
    0 0 20px rgba(34, 211, 238, 0.4),
    0 0 40px rgba(34, 211, 238, 0.2),
    0 0 60px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

/* Animação de rotação do feixe */
@keyframes rotateBorder {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Transições suaves */
.hero--branch .btn--primary {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero--branch .btn--primary::before {
  transition: background 0.3s ease, filter 0.3s ease;
}

/* PlayLab - Gradiente vibrante com partículas interativas */
.hero--playlab {
  background: 
    radial-gradient(circle at 1.5px 1.5px, rgba(255,255,255,0.05) 1.5px, transparent 1.5px),
    radial-gradient(circle at 45% 35%, rgba(139, 92, 246, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 55% 65%, rgba(236, 72, 153, 0.1) 0%, transparent 60%);
  background-size: 40px 40px, 100% 100%, 100% 100%;
  position: relative;
}

.hero--playlab::before {
  background: linear-gradient(120deg, rgba(139,92,246,0) 0%, rgba(236,72,153,0.2) 50%, rgba(139,92,246,0) 100%);
  filter: blur(28px);
}

/* Partículas flutuantes para PlayLab */
.hero--playlab::after {
  content: '';
  position: absolute;
  top: 25%;
  left: 20%;
  width: 5px;
  height: 5px;
  background: rgba(236, 72, 153, 0.7);
  border-radius: 50%;
  box-shadow: 
    80px 40px 0 rgba(139, 92, 246, 0.5),
    -70px 60px 0 rgba(236, 72, 153, 0.6),
    120px -50px 0 rgba(139, 92, 246, 0.4),
    -100px -40px 0 rgba(236, 72, 153, 0.5);
  animation: particleFloat 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero--playlab::after {
    animation: none !important;
  }
}

/* ===== SEÇÃO: ÚLTIMAS ENTREGAS DO WEBLAB ===== */

.weblab-showcase {
  padding: var(--section-padding) 0;
  background: rgba(255, 255, 255, 0.01);
}

.showcase__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  perspective: 1000px;
}

.showcase-card {
  background: rgba(10, 10, 12, 0.6);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
  transition: all 0.4s ease;
  transform-style: preserve-3d;
  cursor: pointer;
  position: relative;
}

.showcase-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 12px 40px rgba(59, 130, 246, 0.25),
    0 0 20px rgba(34, 211, 238, 0.1);
}

.showcase-frame{
  position: relative;
  width: 100%;
  /* a altura será definida por JS conforme o scale (sem barras pretas) */
  overflow: hidden;
  border-radius: 18px;
  background: #0b0b0e;
}

/* Iframe em tamanho “real”, posicionado no canto e reescalado por JS */
.showcase-frame iframe{
  position: absolute;
  top: 0; left: 0;
  width: 1280px;            /* base de cálculo do scale */
  height: 800px;            /* “janela” que queremos pré-visualizar */
  transform-origin: 0 0;    /* escala a partir do topo/esquerda */
  border: 0;
  pointer-events: none;     /* o clique vai no card (abre em nova aba) */
  visibility: hidden;       /* evita “flash” preto até carregar */
  transition: opacity .25s ease;
  opacity: 0;
}
.showcase-frame iframe.is-ready{
  visibility: visible;
  opacity: 1;
}

/* responsividade */
@media (min-width: 1024px) {
  .showcase-frame {
    height: 280px;
  }
}

@media (max-width: 767px) {
  .showcase-frame {
    height: 180px;
  }
}

/* título */
.weblab-showcase .section__title {
  text-align: center;
}

.weblab-showcase .section__subtitle {
  text-align: center;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto;
}

/* hover luminoso sutil */
.showcase-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(59,130,246,0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.showcase-card:hover::after {
  opacity: 1;
}
.showcase-frame iframe {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Edge antigo */
}

.showcase-frame iframe::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}
