/* mercadoautonomo.css - DR Sistemas */

/* === Variáveis === */
:root {
  --blue: #0a2463;
  --dark: #0a1a3a;
  --muted: #6b7280;
  --bg: #f9fafc;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 8px 25px rgba(2,6,23,0.07);
  --transition: 0.28s ease;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* === Reset === */
body {
  margin: 0;
  color: #111827;
  background: white;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.white-band {
  position: relative;
  background: #E8ECF7;
  padding: 1rem 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
}

/* ====================
   Blue banner
   ==================== */
.blue-band.varejo-banner {
  position: relative;
  background: var(--blue);
  color: #fff;
  padding: 5rem 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blue-band.varejo-banner h3 {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  max-width: 920px;
}

.blue-band.varejo-banner p {
  margin-top: 1rem;
  opacity: 0.95;
  max-width: 820px;
  font-size: 1.05rem;
}

.blue-band.varejo-banner::before,
.blue-band.varejo-banner::after {
  content: "";
  position: absolute;
  z-index: 1;
  opacity: 0.12;
  border-radius: 10px;
}
.blue-band.varejo-banner::before {
  width: 160px; height: 160px; top: -40px; left: -60px;
  border: 2px solid rgba(255,255,255,0.18);
  transform: rotate(12deg);
}
.blue-band.varejo-banner::after {
  width: 220px; height: 110px; bottom: -50px; right: -80px;
  border: 2px solid rgba(255,255,255,0.18);
  transform: rotate(-10deg);
}

/* Decorative */
.blue-band .dots::before,
.blue-band .dots::after {
  content: ""; position: absolute;
  width: 6px; height: 6px;
  background: rgba(255,255,255,0.45);
  border-radius: 50%;
}
.blue-band .dots::before { top: 30%; left: 10%; }
.blue-band .dots::after  { bottom: 25%; right: 15%; }

.blue-band .line {
  position: absolute;
  width: 120px; height: 1px;
  background: rgba(255,255,255,0.35);
  transform: rotate(-25deg);
  z-index: 1;
}
.blue-band .line.one { top: 15%; right: 20%; }
.blue-band .line.two { bottom: 20%; left: 15%; }

/* ====================
   Features grid
   ==================== */
.features-section {
  padding: 4rem 0;
  background: #fff;
}

.features-intro h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--blue);
}

.features-intro .muted {
  color: var(--muted);
  margin-bottom: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.6rem;
  margin-top: 1.6rem;
}

.feature-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #0066ff);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card i  { font-size: 2.2rem; color: var(--blue); margin-bottom: 0.75rem; }
.feature-card h4 { margin: 0.4rem 0 0.6rem; font-size: 1.05rem; font-weight: 700; }
.feature-card p  { margin: 0; color: #5b616b; font-size: 0.95rem; line-height: 1.5; }
.feature-card:hover { transform: translateY(-8px); box-shadow: 0 16px 35px rgba(2,6,23,0.1); }

/* ====================
   Product visual
   ==================== */
.product-visual {
  padding: 3.5rem 0 4rem;
  background: var(--bg);
}

.product-visual-alt {
  background: #fff;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.grid-two-reverse { direction: rtl; }
.grid-two-reverse > * { direction: ltr; }

.visual-image {
  width: 100%;
  max-width: 460px;
  display: block;
  margin: 0 auto;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(2,6,23,0.1);
  transition: transform .35s ease, box-shadow .35s ease;
}
.visual-image:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 50px rgba(2,6,23,0.14);
}

.visual-image-phone {
  max-width: 300px;
  box-shadow: 0 16px 50px rgba(2,6,23,0.18);
}

.totem-badge-wrap { position: relative; }
.totem-badge {
  position: absolute;
  top: -10px; right: 10px;
  background: var(--blue);
  color: #fff;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  box-shadow: 0 4px 14px rgba(10,36,99,.3);
}

.visual-right h3 {
  font-size: 1.6rem;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.visual-right p {
  color: #444;
  font-size: .97rem;
  line-height: 1.7;
  margin-bottom: .5rem;
}

.checklist { margin-top: 1rem; padding: 0; list-style: none; color: #333; }
.checklist li {
  margin-bottom: 0.9rem;
  font-size: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.checklist li i { color: var(--blue); margin-top: 4px; flex-shrink: 0; }

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.85rem 1.6rem;
  background: linear-gradient(90deg, #0056b3 0%, #0099ff 100%);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  margin-top: 1.4rem;
  box-shadow: 0 10px 30px rgba(2,6,23,0.1);
  transition: transform var(--transition), box-shadow var(--transition);
}
.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0,86,179,0.3);
  color: #fff;
}

/* ====================
   Integrations
   ==================== */
.integrations-section {
  padding: 4rem 0;
  background: #fff;
}

.integrations-section h3 {
  font-size: 1.6rem;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: .6rem;
}

.integrations-section p {
  color: #555;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.integration-image {
  width: 100%;
  max-width: 480px;
  display: block;
  margin-left: auto;
  border-radius: 14px;
  box-shadow: 0 10px 36px rgba(2,6,23,0.1);
  transition: transform .35s ease;
}
.integration-image:hover { transform: translateY(-5px); }

/* ====================
   CTA final
   ==================== */
.cta-final {
  padding: 4rem 0;
  background: var(--blue);
  color: #fff;
  text-align: center;
}
.cta-box { max-width: 900px; margin: 0 auto; }
.cta-box h3 { font-size: 1.7rem; margin-bottom: .5rem; font-weight: 700; }
.cta-box p  { margin-bottom: 1.4rem; opacity: .95; font-size: 1.05rem; }
.cta-large  { padding: 1rem 2rem; font-size: 1.05rem; border-radius: 999px; }

/* ====================
   Seção segmentos carrossel
   ==================== */
.seg-section {
  padding: 3.5rem 0;
  background: #f0f5ff;
  overflow: hidden;
  border-top: 1px solid #d8e8ff;
  border-bottom: 1px solid #d8e8ff;
}

.seg-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .3rem;
}

.seg-sub {
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.seg-row { margin-bottom: 0; }

.seg-track-wrap {
  overflow: hidden;
  position: relative;
}
.seg-track-wrap::before,
.seg-track-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}
.seg-track-wrap::before { left: 0;  background: linear-gradient(to right, #f0f5ff, transparent); }
.seg-track-wrap::after  { right: 0; background: linear-gradient(to left,  #f0f5ff, transparent); }

.seg-track {
  display: flex;
  gap: 12px;
  width: max-content;
  padding: 1rem 0;
  animation: segScrollLeft 30s linear infinite;
}

@keyframes segScrollLeft {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.seg-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 50px;
  font-family: "Poppins", sans-serif;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  border: 2px solid;
  transition: transform .2s;
  cursor: default;
}
.seg-card:hover { transform: scale(1.07); }
.seg-emoji { font-size: 1.1rem; }

.c1 { background: #e8f0ff; border-color: #b8d0ff; color: #0a2463; }
.c2 { background: #e6fff2; border-color: #9fe4c4; color: #0a5c36; }
.c3 { background: #fff3e8; border-color: #ffc99e; color: #7a3500; }
.c4 { background: #fce8ff; border-color: #e4a9ff; color: #5a0a7a; }
.c5 { background: #fff8e0; border-color: #ffe080; color: #7a5c00; }
.c6 { background: #ffe8e8; border-color: #ffb0b0; color: #7a0a0a; }
.c7 { background: #e8fffd; border-color: #9fe4df; color: #0a5a5c; }
.c8 { background: #f0ffe8; border-color: #b0e89f; color: #1a5a0a; }

/* ====================
   Responsive
   ==================== */
@media (max-width: 992px) {
  .grid-two { grid-template-columns: 1fr; gap: 2rem; }
  .grid-two-reverse { direction: ltr; }
  .visual-image { max-width: 420px; margin-bottom: 1.2rem; }
  .visual-image-phone { max-width: 260px; }
  .totem-badge { top: 10px; right: 20px; }
}

@media (max-width: 768px) {
  .blue-band.varejo-banner h3 { font-size: 1.6rem; padding: 0 1rem; }
  .blue-band.varejo-banner p  { font-size: .95rem; padding: 0 1rem; }
  .features-grid { grid-template-columns: 1fr !important; gap: 1rem; }
  .feature-card { padding: 1.2rem; }
  .seg-track { animation-duration: 20s; }
}

/* ══════════════════════════════════════════════
   ANIMAÇÕES — versão corrigida
   body usa bodyFade (só opacity) para não bugar
   o navbar position:fixed durante a animação
══════════════════════════════════════════════ */

@keyframes bodyFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

/* Body: apenas opacity — nunca transform */
body { animation: bodyFade 0.7s ease; }

/* Navbar nunca anima */
.navbar { animation: none !important; transform: none !important; }

html { scroll-behavior: smooth; }

/* Banner */
.varejo-banner h3 { opacity: 0; animation: fadeUp 1s ease forwards .2s; }
.varejo-banner p  { opacity: 0; animation: fadeUp 1s ease forwards .45s; }

/* Feature cards */
.features-grid .feature-card {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp .75s ease forwards;
}
.features-grid .feature-card:nth-child(1) { animation-delay: .2s; }
.features-grid .feature-card:nth-child(2) { animation-delay: .35s; }
.features-grid .feature-card:nth-child(3) { animation-delay: .5s; }
.features-grid .feature-card:nth-child(4) { animation-delay: .65s; }
.features-grid .feature-card:nth-child(5) { animation-delay: .8s; }
.features-grid .feature-card:nth-child(6) { animation-delay: .95s; }

.feature-card { transition: transform var(--transition), box-shadow var(--transition); }

/* Imagens produto */
.product-visual img {
  opacity: 0;
  transform: translateX(-30px);
  animation: fadeIn 1s ease forwards .5s;
}

.product-visual-alt img {
  transform: translateX(30px);
}

/* Texto visual */
.product-visual .visual-right {
  opacity: 0;
  animation: fadeUp 1s ease forwards .8s;
}

/* Integrações */
.integrations-section {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 1s ease forwards 1.2s;
}

/* CTA */
.cta-final .cta-box {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 1s ease forwards 1.5s;
}

/* Scroll timeline — browsers modernos */
@supports (animation-timeline: view()) {
  .features-grid .feature-card {
    animation: fadeUp 700ms ease both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
  .features-grid .feature-card:nth-child(1) { animation-delay: 0ms; }
  .features-grid .feature-card:nth-child(2) { animation-delay: 80ms; }
  .features-grid .feature-card:nth-child(3) { animation-delay: 160ms; }
  .features-grid .feature-card:nth-child(4) { animation-delay: 240ms; }
  .features-grid .feature-card:nth-child(5) { animation-delay: 320ms; }
  .features-grid .feature-card:nth-child(6) { animation-delay: 400ms; }

  .product-visual .visual-image {
    animation: fadeLeft 900ms ease both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
  .product-visual .visual-right {
    animation: fadeUp 800ms ease both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
  .integration-image {
    animation: fadeLeft 900ms ease both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
  .cta-box {
    animation: fadeUp 800ms ease both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
}

/* Mobile: sem delays */
@media (max-width: 768px) {
  .features-grid .feature-card,
  .product-visual img,
  .product-visual .visual-right,
  .integrations-section,
  .cta-final .cta-box {
    animation-delay: 0s !important;
    opacity: 1;
    transform: none;
  }
}

/* ====================
   Seção de vídeo
   ==================== */
.video-section {
  background: #06101f;
  padding: 5rem 0;
  text-align: center;
}

.video-label {
  font-family: "Courier New", monospace;
  font-size: .75rem;
  letter-spacing: .2em;
  color: rgba(100, 160, 255, .5);
  text-transform: uppercase;
  margin-bottom: .4rem;
}

.video-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: .4rem;
}

.video-sub {
  font-size: .95rem;
  color: rgba(200, 215, 240, .6);
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-inline: auto;
  line-height: 1.7;
}

.video-wrap {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 30px 80px rgba(0,0,0,.6);
  background: #000;
  cursor: pointer;
}

.video-player {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  object-fit: cover;
}

/* Overlay aparece quando o vídeo está pausado */
.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 16, 31, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

/* Mostra o overlay no hover também */
.video-wrap:hover .video-overlay {
  opacity: 1;
  pointer-events: auto;
}

.video-play-btn {
  width: 68px;
  height: 68px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,.4);
  border-radius: 50%;
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
  padding: 0;
  line-height: 1;
}

.video-play-btn:hover {
  background: rgba(255,255,255,.28);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .video-section { padding: 3.5rem 0; }
  .video-title   { font-size: 1.4rem; }
  .video-wrap    { border-radius: 12px; }
  .video-player  { border-radius: 12px; }
  .video-overlay { border-radius: 12px; }
}

/* ── App Gestor section: imagem ESQUERDA no desktop, ABAIXO no mobile ── */

/* No desktop: grid-two é 1fr 1fr.
   Texto (visual-right, 1º no DOM) → coluna 2 (direita)
   Imagem (visual-left, 2º no DOM) → coluna 1 (esquerda) */
.app-gestor-text { order: 2; }
.app-gestor-img  { order: 1; }

/* Remove caixa/sombra da imagem do gestor */
.app-gestor-img .visual-image {
  box-shadow: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.app-gestor-img .visual-image:hover {
  box-shadow: none !important;
  transform: none !important;
}

/* Remove qualquer borda/fundo do wrapper */
.app-gestor-img {
  background: transparent !important;
  box-shadow: none !important;
}

/* Controla altura máxima para não ultrapassar viewport no desktop */
.app-gestor-img .visual-image {
  max-height: 75vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Mobile: volta à ordem natural (texto acima, imagem abaixo) */
@media (max-width: 768px) {
  .app-gestor-text { order: 1; }
  .app-gestor-img  { order: 2; }

  .app-gestor-img .visual-image {
    max-height: 60vw;
  }
}