/* ============================================================
   mobile.css — overrides mobile ONLY.
   Carregado depois de components.css.
   Nada aqui afeta desktop (>900px).
   ============================================================ */

/* ---------- Mobile menu button (oculto no desktop) ---------- */
.mobile-menu-btn {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.mmb-bar {
  position: absolute;
  left: 10px;
  width: 20px;
  height: 1.5px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 240ms var(--ease, cubic-bezier(.22,.61,.36,1)), opacity 180ms linear, top 240ms var(--ease, cubic-bezier(.22,.61,.36,1));
}
.mmb-bar-1 { top: 13px; }
.mmb-bar-2 { top: 19px; }
.mmb-bar-3 { top: 25px; }
.mmb-bar-1.is-open { top: 19px; transform: rotate(45deg); }
.mmb-bar-2.is-open { opacity: 0; }
.mmb-bar-3.is-open { top: 19px; transform: rotate(-45deg); }

/* ---------- Mobile drawer (oculto no desktop) ---------- */
.mobile-drawer {
  position: fixed;
  inset: 64px 0 0 0;
  background: rgba(10,10,10,0.98);
  backdrop-filter: blur(20px);
  z-index: 90;
  padding: 24px 24px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 260ms cubic-bezier(.22,.61,.36,1), opacity 200ms linear;
  visibility: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-drawer.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-drawer-nav a {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.mobile-drawer-nav a:last-child {
  border-bottom: none;
}
.mobile-drawer-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  padding-bottom: 8px;
}
.mobile-drawer-cta .link {
  text-align: center;
  padding: 12px;
  color: var(--fg-2);
  font-size: 15px;
}
.mobile-drawer-cta .btn {
  width: 100%;
  justify-content: center;
  padding: 16px 20px;
  font-size: 15px;
}

@media (min-width: 901px) {
  .mobile-drawer { display: none !important; }
  .mobile-menu-btn { display: none !important; }
}

@media (max-width: 900px) {

  /* ---------- OVERFLOW GUARD: seções com elementos absolute grandes ---------- */
  html { overflow-x: hidden !important; }
  .hero,
  .final,
  .trustbar-standalone,
  .whatis-engines {
    overflow: hidden !important;
  }

  /* ---------- HERO: headline menor, botões full-width ---------- */
  /* o JSX tem fontSize: 81px inline; !important derrota */
  .hero-headline {
    font-size: clamp(34px, 9vw, 52px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.02em !important;
  }
  .hero-headline br {
    display: none !important;
  }
  .hero-sub {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
  .hero-cta {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-top: 32px !important;
    width: 100% !important;
  }
  .hero-cta .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 14px 20px !important;
    font-size: 15px !important;
    white-space: nowrap !important;
  }
  .hero-meta {
    flex-wrap: wrap !important;
    gap: 10px !important;
    font-size: 11px !important;
  }
  .hero-meta .sep {
    display: none !important;
  }
  .hero-chip {
    font-size: 12px !important;
  }
  /* ---------- HEADER: drawer mobile ---------- */
  .site-header .nav,
  .site-header .header-cta .link,
  .site-header .header-cta .btn {
    display: none !important;
  }
  .site-header .mobile-menu-btn {
    display: inline-flex !important;
  }
  /* quando o drawer está aberto, travar o scroll do body */
  body.menu-open {
    overflow: hidden !important;
  }

  /* ---------- USECASES: valores não cabem em 3 colunas ---------- */
  .uc-math {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 4px 0 !important;
  }
  .uc-math-cell {
    flex-direction: row !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    padding: 14px 16px !important;
    gap: 12px !important;
  }
  .uc-math-sep {
    height: 1px !important;
    width: 100% !important;
  }
  .uc-math-val,
  .uc-math-val-total {
    font-size: 15px !important;
    white-space: nowrap !important;
  }
  .uc-card-body {
    padding: 24px !important;
  }

  /* ---------- FAQ: desgruda o lado esquerdo ---------- */
  #faq .faq-side {
    position: static !important;
    top: auto !important;
  }

  /* ---------- ESCALA: desliga o scrolljack ---------- */
  .escala-scroller {
    height: auto !important;
  }
  .escala-sticky {
    position: static !important;
    height: auto !important;
    display: block !important;
    padding: 72px 0 !important;
    overflow: visible !important;
  }
  .escala-grid {
    display: block !important;
  }
  /* esconde o visual animado (inútil sem o scroll) */
  .escala-visual {
    display: none !important;
  }
  /* esconde a barra de progresso (não faz sentido sem scrolljack) */
  .escala-progress {
    display: none !important;
  }
  /* mostra TODOS os steps empilhados em vez de um por vez */
  .escala-text {
    display: block !important;
  }
  .escala-steps {
    position: static !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 48px !important;
    margin-top: 32px !important;
  }
  .escala-step {
    position: static !important;
    inset: auto !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    padding-top: 32px !important;
    border-top: 1px solid var(--border) !important;
  }
  .escala-step:first-child {
    border-top: none !important;
    padding-top: 0 !important;
  }
  .escala-word {
    font-size: clamp(40px, 11vw, 64px) !important;
    margin-bottom: 16px !important;
  }
  .escala-body {
    font-size: 16px !important;
    max-width: none !important;
  }
  .escala-step-kicker {
    margin-bottom: 16px !important;
  }

  /* ---------- PROCESS: desliga o scrolljack ---------- */
  /* o JSX aplica height inline (500vh); !important derrota isso */
  .process {
    height: auto !important;
  }
  .process-sticky {
    position: static !important;
    height: auto !important;
    display: block !important;
    padding: 72px 0 !important;
    overflow: visible !important;
  }
  .process-inner {
    display: block !important;
  }
  /* esconde o canvas à direita */
  .process-right {
    display: none !important;
  }
  /* esconde a barra de progresso */
  .process-progress {
    display: none !important;
  }
  /* header do process aparece normalmente */
  .process-head {
    max-width: none !important;
    margin-bottom: 32px !important;
  }
  /* empilha TODOS os passos visíveis */
  .process-steps-stage {
    position: static !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 48px !important;
  }
  .process-step-card {
    position: static !important;
    inset: auto !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    padding-top: 32px !important;
    border-top: 1px solid var(--border) !important;
  }
  .process-step-card:first-child {
    border-top: none !important;
    padding-top: 0 !important;
  }
  .step-title-lg {
    font-size: clamp(26px, 6.5vw, 38px) !important;
  }
  .step-body-lg {
    font-size: 16px !important;
    max-width: none !important;
  }
}
