/* Import Google Fonts - Plus Jakarta Sans */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-primary: 'Plus Jakarta Sans', sans-serif;
  --color-bg: #ffffff;
  --color-primary: #2F59A5;
  --color-primary-light: #4c7cc4;
  --color-primary-dark: #1e3c73;
  --color-secondary: #F18C28;
}

/* Custom resets & settings */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: #0f172a;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Lenis Scroll Smoothness Core styles */
html {
  scroll-behavior: auto !important;
}

html.lenis, html.lenis-smooth {
  height: auto;
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overflow: clip;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Glassmorphism system */
.bg-glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.border-glass {
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.border-glass-glow {
  border: 1px solid rgba(47, 89, 165, 0.2);
}

/* Glowing utilities */
.glow-green {
  box-shadow: 0 0 15px 2px rgba(241, 140, 40, 0.25);
}

.glow-primary {
  box-shadow: 0 0 25px 4px rgba(47, 89, 165, 0.12);
}

.glow-primary-hover {
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.glow-primary-hover:hover {
  box-shadow: 0 0 35px 8px rgba(47, 89, 165, 0.25);
}

/* 3D Perspective container */
.perspective-container {
  perspective: 2000px;
  transform-style: preserve-3d;
}

.perspective-element {
  transform: rotateY(-18deg) rotateX(12deg) rotateZ(4deg);
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Floating micro-animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

.float-slow {
  animation: float 6s ease-in-out infinite;
}

.float-fast {
  animation: float 4s ease-in-out infinite;
}

/* Pulsating green badge */
@keyframes pulse-glow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px 2px rgba(34, 197, 94, 0.5);
  }
  50% {
    transform: scale(1.2);
    box-shadow: 0 0 16px 5px rgba(34, 197, 94, 0.8);
  }
}

.pulse-badge {
  animation: pulse-glow 2.5s infinite ease-in-out;
}

/* Ambient gradient background glows */
.gradient-glow-1 {
  background: radial-gradient(circle, rgba(47, 89, 165, 0.08) 0%, rgba(47, 89, 165, 0) 70%);
}

.gradient-glow-2 {
  background: radial-gradient(circle, rgba(241, 140, 40, 0.08) 0%, rgba(241, 140, 40, 0) 70%);
}

/* Text clipping */
.text-gradient {
  background: linear-gradient(135deg, #0f172a 30%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-primary {
  background: linear-gradient(135deg, #2f59a5 0%, #1e3c73 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Spotlight Glow Card styles */
.spotlight-card {
  position: relative;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.5rem; /* rounded-3xl */
  overflow: hidden;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(47, 89, 165, 0.06),
    transparent 50%
  );
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.spotlight-card:hover::before {
  opacity: 1;
}

/* Smart POS Device container styles */
.smart-pos-device {
  width: 270px;
  background: #181d28;
  border-radius: 36px;
  position: relative;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.6),
    inset 0 2px 2px rgba(255, 255, 255, 0.1),
    inset 0 -2px 10px rgba(0, 0, 0, 0.6),
    0 0 0 1px #222b3c,
    0 0 30px 4px rgba(16, 185, 129, 0.08);
  padding: 8px 8px 10px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  user-select: none;
}

/* Modern top speaker notch */
.smart-pos-speaker {
  width: 48px;
  height: 4px;
  background: #2b3548;
  border-radius: 2px;
  margin-top: 6px;
  margin-bottom: 8px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
}

/* Screen bezel and wrapper - Matches exact 540x1200 aspect ratio of system screenshots */
.smart-pos-screen-wrapper {
  width: 100%;
  aspect-ratio: 540 / 1200;
  background: #020617; /* slate-950 */
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  border: 2px solid #111520;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
}

/* Glass screen glare */
.smart-pos-glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.02) 100%);
  pointer-events: none;
  z-index: 10;
}

/* Bottom status LED */
.smart-pos-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px 1px #10b981;
  margin-top: 8px;
  margin-bottom: 2px;
}

/* Screen content transitions (matching test.html) */
.phone-screen {
  position: relative;
  overflow: hidden;
}

.phone-screen img,
.pos-screen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none;
}

.phone-screen img.active,
.pos-screen-img.active {
  opacity: 1;
  pointer-events: auto;
}


/* Standalone mobile Smart POS */
.smart-pos-device-mobile {
  width: 240px;
  border-radius: 32px;
  padding: 7px 7px 9px 7px;
  margin: 1.5rem auto 0.5rem auto;
  box-shadow: 
    0 20px 40px -10px rgba(0, 0, 0, 0.4),
    inset 0 2px 2px rgba(255, 255, 255, 0.1),
    inset 0 -2px 10px rgba(0, 0, 0, 0.6),
    0 0 0 1px #222b3c,
    0 0 25px 3px rgba(16, 185, 129, 0.08);
}

.smart-pos-device-mobile .smart-pos-speaker {
  width: 40px;
  height: 3px;
  margin-top: 5px;
  margin-bottom: 7px;
}

.smart-pos-device-mobile .smart-pos-screen-wrapper {
  border-radius: 22px;
}

/* --- Section 4: Eventos Stepper & Scanner Styles --- */
.step-indicator {
  box-shadow: 0 0 0 0px rgba(16, 185, 129, 0);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.step-item {
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes laser-sweep {
  0%, 100% {
    top: 1rem;
  }
  50% {
    top: calc(100% - 1.25rem - 2px);
  }
}

.laser-line {
  animation: laser-sweep 3.5s infinite ease-in-out;
}

/* --- Section 5: Gestão Dashboard Animations --- */
.line-chart-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 2.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.donut-segment {
  transition: stroke-dasharray 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.abc-bar {
  transition: width 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- Section 6: Hardware Flex Accordion (Desktop) & Swiper (Mobile) --- */
.hardware-card {
  position: relative;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.5rem;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.hardware-card:hover {
  border-color: rgba(47, 89, 165, 0.25);
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 20px 40px -15px rgba(15, 23, 42, 0.1),
    0 0 25px 2px rgba(47, 89, 165, 0.04);
}

.hardware-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Desktop Flex Accordion */
.hardware-accordion-container {
  min-height: 480px;
  transition: gap 0.7s cubic-bezier(0.25, 1, 0.35, 1);
}

.hardware-flex-card {
  flex: 1 1 0%;
  min-width: 0;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.5rem;
  transition: flex 0.7s cubic-bezier(0.25, 1, 0.35, 1), 
              width 0.7s cubic-bezier(0.25, 1, 0.35, 1),
              opacity 0.55s cubic-bezier(0.25, 1, 0.35, 1),
              padding 0.6s cubic-bezier(0.25, 1, 0.35, 1),
              border-color 0.45s ease, 
              background-color 0.45s ease, 
              box-shadow 0.65s cubic-bezier(0.25, 1, 0.35, 1),
              transform 0.55s cubic-bezier(0.25, 1, 0.35, 1);
  will-change: flex, opacity, transform;
}

.hardware-flex-card:hover {
  border-color: rgba(47, 89, 165, 0.25);
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 15px 35px -10px rgba(15, 23, 42, 0.08);
}

.hardware-card-text-col {
  width: 100%;
  min-width: 240px;
  transition: width 0.65s cubic-bezier(0.25, 1, 0.35, 1);
}

.hardware-media-showcase {
  width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(16px) scale(0.97);
  transition: width 0.7s cubic-bezier(0.25, 1, 0.35, 1), 
              opacity 0.45s ease 0.12s,
              transform 0.6s cubic-bezier(0.25, 1, 0.35, 1) 0.08s;
}

/* Hover no Desktop: O card em hover expande para 100% de forma suave (soft) */
@media (min-width: 1024px) {
  /* Quando o container estiver em hover com um card expandido, anima o gap e recolhe os outros */
  .hardware-accordion-container.has-expanded-card,
  .hardware-accordion-container:has(.hardware-flex-card.has-media:hover) {
    gap: 0 !important;
  }

  .hardware-accordion-container.has-expanded-card .hardware-flex-card:not(:hover),
  .hardware-accordion-container:has(.hardware-flex-card.has-media:hover) .hardware-flex-card:not(:hover) {
    flex: 0 0 0% !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    opacity: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-color: transparent !important;
    pointer-events: none !important;
    overflow: hidden !important;
  }

  /* O card com hover assume 100% do container */
  .hardware-accordion-container.has-expanded-card .hardware-flex-card.has-media:hover,
  .hardware-accordion-container:has(.hardware-flex-card.has-media:hover) .hardware-flex-card.has-media:hover {
    flex: 1 1 100% !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.12),
                0 0 35px 2px rgba(16, 185, 129, 0.05);
  }

  .hardware-accordion-container.has-expanded-card .hardware-flex-card.has-media:hover .hardware-card-text-col,
  .hardware-accordion-container:has(.hardware-flex-card.has-media:hover) .hardware-flex-card.has-media:hover .hardware-card-text-col {
    width: 42%;
  }

  .hardware-accordion-container.has-expanded-card .hardware-flex-card.has-media:hover .hardware-media-showcase,
  .hardware-accordion-container:has(.hardware-flex-card.has-media:hover) .hardware-flex-card.has-media:hover .hardware-media-showcase {
    width: 58%;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
  }
}

/* Botões de miniaturas de hardware */
.hardware-thumb-btn {
  transition: all 0.2s ease;
  opacity: 0.6;
}

.hardware-thumb-btn:hover,
.hardware-thumb-btn.active {
  opacity: 1;
  border-color: #10b981;
  transform: scale(1.05);
}

/* Mobile Swiper Stacked Cards (1/6 Peek + Depth Scale) */
.hardware-swiper-box {
  position: relative;
  width: 100%;
}

.hardware-swiper {
  width: 100%;
  overflow: visible !important;
  padding: 8px 0 32px 0;
}

.hardware-swiper .swiper-slide {
  border-radius: 1.5rem;
  overflow: hidden;
  will-change: transform, opacity, filter, box-shadow;
  transition: box-shadow 0.3s ease;
}

/* O card ativo projeta uma sombra lateral direita marcante sobre a imagem de trás */
.hardware-swiper .swiper-slide-active {
  box-shadow: 
    20px 0 35px -6px rgba(15, 23, 42, 0.30),
    8px 0 16px -4px rgba(15, 23, 42, 0.20),
    0 20px 30px -10px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(15, 23, 42, 0.06) !important;
  z-index: 50 !important;
}

/* Card de trás fica com z-index menor e sem sombra competindo com o da frente */
.hardware-swiper .swiper-slide:not(.swiper-slide-active) {
  box-shadow: none !important;
  z-index: 10 !important;
}

.hardware-swiper .swiper-pagination {
  position: relative !important;
  margin-top: 0.75rem;
  bottom: 0 !important;
}

.hardware-swiper .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: #94a3b8;
  opacity: 0.5;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0 4px !important;
}

.hardware-swiper .swiper-pagination-bullet-active {
  width: 24px;
  border-radius: 9999px;
  background: #10b981;
  opacity: 1;
}

/* --- Section 7: FAQ Accordion Styles --- */
.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-content.open {
  grid-template-rows: 1fr;
}

.accordion-inner {
  overflow: hidden;
  min-height: 0;
}

/* --- Section 7: Mega Conversion Card Glow Styles --- */
.border-glow-card {
  position: relative;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.08);
  z-index: 1;
}

.border-glow-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(135deg, rgba(47, 89, 165, 0.3), rgba(241, 140, 40, 0.3));
  border-radius: 2rem;
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.5s ease;
  opacity: 0.6;
}

.border-glow-card::after {
  content: '';
  position: absolute;
  inset: -6px;
  background: linear-gradient(135deg, #2F59A5, #F18C28);
  border-radius: 2.2rem;
  z-index: -2;
  filter: blur(20px);
  pointer-events: none;
  opacity: 0.08;
  transition: opacity 0.5s ease;
}

.border-glow-card:hover::before {
  opacity: 1;
}

.border-glow-card:hover::after {
  opacity: 0.2;
}

/* Em tablet e abaixo (< 1024px), o card de conversão ocupa 100% da largura
   da tela, sem bordas arredondadas, borda ou brilho que criem recuo lateral.
   No desktop (>= 1024px) permanece como está. */
@media (max-width: 1023px) {
  .border-glow-card--full-bleed {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .border-glow-card--full-bleed::before,
  .border-glow-card--full-bleed::after {
    display: none;
  }
}

/* --- Video Scroll Transition Collage Styles --- */
#hero-collage-container {
  position: relative;
  width: 100%;
}

#hero-video-container {
  will-change: width, height, left, top, border-radius;
  pointer-events: none;
  transform: translate3d(0, 0, 0); /* Force GPU acceleration */
  overflow: hidden;
}

#hero-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#collage-section {
  will-change: opacity, transform;
}

#collage-grid {
  perspective: 1000px;
}

#collage-grid > div {
  backface-visibility: hidden;
  will-change: transform;
}

/* ==========================================================================
   MOBILE RESPONSIVE OPTIMIZATIONS
   ========================================================================== */

/* --- Mobile Hero Section Optimizations --- */
@media (max-width: 768px) {
  #hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 5rem;
    padding-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #hero-content-layer {
    min-height: auto;
    height: auto;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
  }

  #hero-title {
    font-size: 1.7rem;
    line-height: 1.18;
    max-width: 100%;
    margin-bottom: 0;
    letter-spacing: -0.01em;
  }

  /* Colapsa as quebras de linha manuais para um título mais compacto no mobile */
  #hero-title br {
    display: none;
  }

  /* Ocultar textos secundários no mobile para dar destaque ao vídeo e à CTA */
  #hero-subtitle {
    display: none !important;
  }

  #hero-ctas {
    margin-top: 1.25rem;
    width: 100%;
    max-width: 300px;
  }

  #hero-ctas a {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    justify-content: center;
  }

  /* CRO: microcópia sutil abaixo da CTA */
  #hero-cta-microcopy {
    opacity: 0.75;
    font-size: 0.8rem;
  }
}

/* --- Mobile & Tablet Smart POS / Food Service Section Optimizations --- */
@media (max-width: 1023px) {
  #food-service {
    padding-top: 3rem;
    padding-bottom: 3rem;
    position: relative;
  }

  #food-service .flex-col {
    gap: 2rem;
  }

  .food-service-block {
    min-height: auto;
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06);
    position: relative;
  }

  .food-service-block:first-child {
    margin-top: 0;
  }

  .food-service-block:last-child {
    margin-bottom: 0;
  }

  /* Garante fluxo sequencial no mobile: nenhum elemento pinado/sticky.
     O container do POS de desktop fica oculto e cada bloco carrega o
     seu próprio mockup logo abaixo do texto correspondente. */
  #food-service .phone-column,
  #pinned-pos-container {
    display: none !important;
  }

  #food-service .text-step {
    opacity: 1 !important;
  }

  #food-service .flex-col,
  #food-service .food-service-block {
    position: static !important;
  }

  /* Mockup mobile acompanha o texto do bloco (fluxo normal, sem travar no topo) */
  .smart-pos-device-mobile {
    position: relative !important;
    top: auto !important;
    transform: none !important;
    margin: 1.5rem auto 0 auto;
  }
}

@media (min-width: 1024px) {
  /* Scrolltelling exatamente como em test.html */
  #food-service .phone-column {
    height: 100vh !important;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 20;
  }

  #food-service .text-column {
    padding: 50vh 0 !important; /* Permite centralizar o primeiro e o último item no scroll */
  }

  #food-service .text-step {
    min-height: 80vh !important; /* Altura de cada bloco de foco */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    opacity: 0.3 !important;
    transition: opacity 0.3s ease !important;
    cursor: pointer;
  }

  #food-service .text-step.active {
    opacity: 1 !important;
  }
}


/* --- Back to top button & Floating widgets --- */
.back-to-top {
  display: flex;
  position: fixed;
  bottom: 15px;
  right: 15px;
  z-index: 9998;
  border: none;
  outline: none;
  background-color: var(--color-primary, #2F59A5);
  color: #ffffff;
  cursor: pointer;
  border-radius: 50%;
  font-size: 18px;
  width: 50px;
  height: 50px;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.2s ease, background-color 0.2s ease;
  text-decoration: none;
}

.back-to-top:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.35);
  color: #ffffff;
}

.back-to-top:active {
  transform: translateY(0) scale(0.95);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Ensure WhatsApp Widget is always on top and perfectly aligned with Back to Top */
.fabwpp {
  position: fixed !important;
  right: 15px !important;
  width: 50px !important;
  height: 50px !important;
  z-index: 9999 !important;
}

.fabwpp button.main {
  width: 50px !important;
  height: 50px !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 9999 !important;
}

.fabwpp ul {
  right: 0 !important;
  z-index: 9998 !important;
}

.fabwpp .wpp-fixed {
  z-index: 9999 !important;
}
