/*!
 * MADMIX — mobile.css
 * Version : 2.1.0
 * Updated : 2026-08-15
 *
 * Carregue APÓS style.css:
 *   <link rel="stylesheet" href="/assets/mobile.css?v=2.1.0" media="(max-width: 900px)">
 *
 * IMPORTANTE:
 * - Não usa !important — a especificidade é controlada pelo atributo media= no HTML.
 * - Não define valores hardcoded — usa os tokens CSS do :root.
 * - A "Camada de Refinamento" original (seção não-scoped com !important) foi removida
 *   e integrada corretamente nos breakpoints abaixo.
 */

/* ══════════════════════════════════════════════
   1. RESET DE OVERFLOW GLOBAL
   ══════════════════════════════════════════════ */
@media (max-width: 767px) {

  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  body {
    font-size: 16px;
  }

  /* Evita que elementos filhos estourem o viewport */
  *:not(#sticky-cta):not(.mobile-nav) {
    max-width: 100%;
  }


  /* ══════════════════════════════════════════════
     2. NAV
     ══════════════════════════════════════════════ */

  nav#main-nav {
    height: 64px;
    padding: 0 5vw;
  }

  .nav-logo img {
    height: 38px;
  }


  /* ══════════════════════════════════════════════
     3. HERO
     ══════════════════════════════════════════════ */

  #hero {
    min-height: 100svh;
    padding: 5.5rem 5vw 3.5rem;
    align-items: flex-start;
    box-sizing: border-box;
    width: 100%;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    min-width: 0;
  }

  .hero-left {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
  }

  .hero-tag {
    font-size: var(--text-2xs);
    letter-spacing: 0.16em;
    margin-bottom: 1.2rem;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .hero-slogan {
    font-size: var(--text-xs);
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
    white-space: normal;
    overflow-wrap: break-word;
  }

  /* H1 — clamp calibrado para 375px–767px */
  h1.hero-h1 {
    font-size: clamp(2.9rem, 13.5vw, 4.8rem);
    line-height: 0.92;
    letter-spacing: 0.01em;
    margin-bottom: 1.6rem;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }

  .hero-sub {
    font-size: var(--text-lg);
    line-height: 1.75;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .hero-proof {
    grid-template-columns: 1fr;
    margin-bottom: 1.5rem;
  }

  .hero-proof-item {
    padding: 0.85rem 1rem;
  }

  .hero-proof-item strong {
    font-size: 1.2rem;
  }

  .hero-ctas {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    width: 100%;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    justify-content: center;
    text-align: center;
    min-height: 48px;
    padding: 0.95rem 1.2rem;
    font-size: var(--text-sm);
    letter-spacing: 0.08em;
    white-space: normal;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }

  .hero-creds {
    font-size: var(--text-2xs);
    letter-spacing: 0.08em;
    margin-top: 1.4rem;
    gap: 0.3rem 0.4rem;
    line-height: 1.6;
    overflow: visible;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Stats */
  .hero-stats {
    margin-top: 2rem;
    padding-top: 1.8rem;
    gap: 1.5rem;
    flex-wrap: wrap;
  }
  .stat-num   { font-size: 2rem; }
  .stat-label { font-size: var(--text-2xs); }

  .hero-side {
    display: block;
    margin-top: 2rem;
    padding: 0.8rem 0.8rem 1.2rem;
  }
  .hero-side--image {
    display: block;
  }
  .hero-ecosystem-art {
    margin: 0 0 0.9rem;
  }
  .hero-ecosystem-art img {
    max-height: 62vh;
    object-fit: contain;
  }
  .hero-side .pillar-item {
    padding: 0.8rem 0;
  }


  /* ══════════════════════════════════════════════
     4. SEÇÕES — PADDING E DENSIDADE
     ══════════════════════════════════════════════ */

  section {
    padding: 3.5rem 5vw;
  }

  .section-tag {
    font-size: var(--text-2xs);
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
  }

  /* Títulos de seção — tamanho fluido bem calibrado */
  h2.section-h2 {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
    line-height: 1;
    margin-bottom: 0.8rem;
    overflow-wrap: break-word;
    word-break: break-word;
  }


  /* ══════════════════════════════════════════════
     5. MERCADO
     ══════════════════════════════════════════════ */

  .mercado-grid { gap: 2.5rem; margin-top: 2.5rem; }
  .fact-num  { font-size: 2.2rem; }
  .fact-text { font-size: var(--text-sm); }

  #mapa-operacao {
    padding-top: 3rem;
  }
  .ops-shell {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ops-board {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  .ops-board::before,
  .ops-board::after,
  .ops-center {
    display: none;
  }
  .ops-card {
    min-height: 160px;
  }
  .ops-flow {
    grid-template-columns: 1fr;
    margin-top: 0;
  }
  .ops-flow div:not(:last-child)::after {
    right: 1rem;
    top: auto;
    bottom: -0.7rem;
    transform: rotate(90deg);
  }


  /* ══════════════════════════════════════════════
     6. FRAMEWORK ARC
     ══════════════════════════════════════════════ */

  .arc-header          { margin-bottom: 2rem; }
  .arc-stage           { padding: 1.8rem 1.4rem; }
  .arc-stage-num       { font-size: 2.5rem; margin-bottom: 0.6rem; }
  .arc-stage-title     { font-size: 1.15rem; }
  .arc-stage-desc      { font-size: var(--text-sm); }
  .arc-cta-row         { padding: 1.4rem 0 0; gap: 1.2rem; }
  .arc-cta-row .btn-primary {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
    box-sizing: border-box;
  }


  /* ══════════════════════════════════════════════
     7. PARA QUEM
     ══════════════════════════════════════════════ */

  .paraquem-intro  { font-size: var(--text-sm); margin-bottom: 2rem; }
  .paraquem-grid   { grid-template-columns: 1fr; gap: 1rem; }
  .paraquem-card   { padding: 1.6rem; flex-direction: row; gap: 1rem; }
  .paraquem-title  { font-size: 1.2rem; }
  .paraquem-dor    { font-size: var(--text-sm); }
  .paraquem-list li { font-size: var(--text-sm); }


  /* ══════════════════════════════════════════════
     8. SERVIÇOS
     ══════════════════════════════════════════════ */

  .servicos-intro-grid { gap: 2rem; margin-bottom: 2.5rem; }
  .pillar-group        { margin-bottom: 2rem; padding-bottom: 1.2rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
  .pillar-group:last-child { border-bottom: none; }
  .servico-card        { padding: 1.5rem; }
  .servico-title       { font-size: 1.1rem; }
  .servico-desc        { font-size: var(--text-sm); line-height: 1.6; }


  /* ══════════════════════════════════════════════
     9. QUEM SOMOS
     ══════════════════════════════════════════════ */

  .qs-header         { margin-bottom: 2rem; }
  .qs-photo-side     { min-height: 260px; }
  .qs-founder        { padding: 1.6rem 1.4rem; }
  .qs-founder-name   { font-size: 1.5rem; }
  .qs-years          { font-size: 1.6rem; }

  /* Bio — exibe 5 linhas, evita blocos enormes de scroll */
  .qs-bio {
    font-size: var(--text-sm);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
  }

  .qs-creds    { gap: 0.3rem; }
  .qs-cred-tag { font-size: var(--text-2xs); padding: 0.2rem 0.5rem; background: rgba(255,255,255,0.05); }

  .qs-closing      { margin-top: 2rem; padding: 1.8rem; }
  .qs-closing-text { font-size: var(--text-md); }


  /* ══════════════════════════════════════════════
     10. PROCESSO
     ══════════════════════════════════════════════ */

  .processo-step { padding: 1.8rem 1.4rem; margin-bottom: 1px; }
  .step-num      { font-size: 3rem; margin-bottom: 1rem; }
  .step-title    { font-size: 1.2rem; }
  .step-desc     { font-size: var(--text-sm); }


  /* ══════════════════════════════════════════════
     11. CONTATO / CTA FINAL
     ══════════════════════════════════════════════ */

  #contato { padding: 3.5rem 5vw; }

  h2.cta-h2 {
    font-size: clamp(2rem, 10vw, 3.2rem);
    line-height: 0.95;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .cta-sub { font-size: var(--text-sm); margin-bottom: 2rem; }

  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .btn-whatsapp {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: var(--text-sm);
    white-space: normal;
    text-align: center;
    box-sizing: border-box;
  }

  /* ══════════════════════════════════════════════
     11A. PROVA DE EXECUÇÃO (#execucao)
     A seção usa inline styles no HTML para o grid e padding.
     !important é necessário aqui exclusivamente para sobrescrever
     os style="" do elemento — não há outra forma sem editar o HTML.
     ══════════════════════════════════════════════ */

  #execucao {
    padding: 3rem 0 !important;
  }

  /* O container tem grid-template-columns: 1fr 1.2fr inline */
  #execucao .container {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    padding: 0 5vw !important;
    text-align: left !important;
  }

  /* Texto centralizado apenas no bloco de texto */
  #execucao .exec-text-side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  /* Vídeo vai para baixo do texto no mobile */
  #execucao .exec-video-side {
    order: 2;
  }

  /* Título da seção — sobrescreve o clamp inline */
  #execucao .section-h2 {
    font-size: clamp(1.8rem, 8vw, 2.4rem) !important;
    line-height: 1 !important;
    margin-bottom: 1rem !important;
  }

  /* Texto em itálico (highlight) */
  #execucao .exec-text-side p[style*="Instrument Serif"],
  #execucao p[style*="1.5rem"] {
    font-size: var(--text-lg) !important;
    margin-bottom: 1.5rem !important;
  }

  /* Lista de features */
  #execucao div[style*="gap: 20px"] {
    font-size: var(--text-md) !important;
    gap: 14px !important;
  }

  /* Botão CTA — full width */
  #execucao .btn-primary {
    width: 100% !important;
    justify-content: center !important;
    margin-top: 2rem !important;
  }

  /* DAI — ícones e cards */
  .dai-cap         { padding: 1.4rem 1.2rem; gap: 8px; }
  .dai-cap-icon    { width: 36px; height: 36px; padding: 7px; border-radius: 7px; }
  .dai-cap-icon svg { width: 20px; height: 20px; }
  .dai-cap-title   { font-size: var(--text-md); }
  .dai-cap-desc    { font-size: var(--text-sm); }
  .dai-cap--full   { flex-direction: row; align-items: flex-start; gap: 14px; }
  .dai-cap--full .dai-cap-icon { flex-shrink: 0; margin-bottom: 0; }

  /* Form de contato */
  .form-section    { padding-top: 2rem; margin-top: 2rem; }
  .contact-form    { gap: 0.85rem; }
  .form-row        { grid-template-columns: 1fr; gap: 0.85rem; }
  .btn-form-submit { width: 100%; padding: 0.95rem 1.5rem; }


  /* ══════════════════════════════════════════════
     12. FOOTER
     ══════════════════════════════════════════════ */

  .footer-col { padding: 2rem 5vw; }
  .footer-brand-logo img { max-height: 48px; }
  .footer-slogan { font-size: var(--text-sm); }


  /* ══════════════════════════════════════════════
     13. LEAD STRIP
     ══════════════════════════════════════════════ */

  #lead-strip { padding: 20px 5vw; }

  .lead-strip-inner {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }

  .lead-strip-content strong { font-size: var(--text-md); }
  .lead-strip-content span   { font-size: var(--text-sm); }

  .lead-strip-form {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }
  .lead-strip-form input[type=email],
  .lead-strip-form button {
    width: 100%;
    box-sizing: border-box;
  }


  /* ══════════════════════════════════════════════
     14. STICKY CTA — safe area (notch / Dynamic Island)
     ══════════════════════════════════════════════ */

  #sticky-cta {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  /* Compensa a altura do sticky CTA (~60px) para o conteúdo final
     não ficar escondido atrás do botão fixo.
     Aplicado apenas quando o sticky está visível (classe toggled pelo JS). */
  body.sticky-cta-visible {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }


  /* ══════════════════════════════════════════════
     15. GUIA BANNER
     ══════════════════════════════════════════════ */

  .guia-banner-inner {
    border: 1px solid var(--red-text);
    background: rgba(232, 114, 74, 0.05);
  }

} /* fim @media (max-width: 767px) */


/* ══════════════════════════════════════════════
   BREAKPOINT INTERMEDIÁRIO 768px–900px
   (tablet portrait)
   ══════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 900px) {

  h1.hero-h1 {
    font-size: clamp(3.2rem, 8vw, 5rem);
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .hero-creds {
    white-space: normal;
    overflow: hidden;
    max-width: 100%;
  }

  .btn-primary,
  .btn-ghost,
  .btn-whatsapp {
    white-space: normal;
    overflow-wrap: break-word;
  }

}


/* ══════════════════════════════════════════════
   16. SCROLL-NAV PILLS — navegação horizontal
   (adicionado v2.1.0 · 2026-05-23)

   A barra de pills substitui o layout antigo do
   nav em mobile: exibe âncoras deslizáveis em
   scroll horizontal logo abaixo do header fixo.

   Estrutura injetada via mobile-nav-pills.js:
     <nav id="mm-pills-nav" aria-label="Seções">
       <div class="mm-pills-track">
         <a class="mm-pill mm-pill--active" href="#hero">Início</a>
         …
       </div>
     </nav>
   ══════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* ── Barra de pills ── */
  #mm-pills-nav {
    position: fixed;
    top: 64px;           /* altura do nav mobile (mobile.css seção 2) */
    left: 0; right: 0;
    z-index: 155;
    background: rgba(9,9,9,0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 0;
    will-change: transform;
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  }

  /* Oculta a barra quando o menu hambúrguer está aberto */
  body.mm-nav-open #mm-pills-nav { transform: translateX(-100%); }

  .mm-pills-track {
    display: flex;
    gap: 6px;
    padding: 9px 16px 9px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  .mm-pills-track::-webkit-scrollbar { display: none; }

  /* Pill base */
  .mm-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    color: rgba(255,255,255,0.76);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.18s, background 0.18s, border-color 0.18s;
    -webkit-tap-highlight-color: transparent;
  }
  .mm-pill:hover {
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.25);
  }

  /* Pill ativa */
  .mm-pill--active {
    background: var(--red, #e8724a);
    border-color: transparent;
    color: #fff;
    font-weight: 500;
  }
  .mm-pill--active:hover { color: #fff; }

  /* ── Compensação de scroll-padding para ancoragem ── */
  /* 64px nav + ~38px pills + 8px folga */
  html {
    scroll-padding-top: 120px;
  }

  /* ── Ajuste do padding-top do <body> para acomodar as duas barras ── */
  /* O hero já usa padding-top: 5.5rem via mobile.css (seção 3).
     Aumentamos para acomodar a barra de pills (38px ≈ 2.375rem). */
  #hero {
    padding-top: 8rem;
  }

  /* ── Visibilidade do hamburger / logo — mantém o layout existente ── */
  /* A barra de pills não altera a altura do nav (64px).
     O logo permanece centralizado e o hamburger à esquerda. */


  /* ── Indicador de "mais conteúdo" (fade na borda direita) ── */
  #mm-pills-nav::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 36px;
    background: linear-gradient(to right, transparent, rgba(9,9,9,0.88));
    pointer-events: none;
  }

}

/* ══════════════════════════════════════════════
   17. DRAWER LATERAL (mobile-nav) — redesign
   Substitui o drawer-da-esquerda existente por
   um drawer-da-direita mais limpo, com idiomas
   e CTA no rodapé.
   ══════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* Reposiciona: da esquerda para a direita */
  .mobile-nav {
    left: auto !important;
    right: 0 !important;
    width: 78% !important;
    max-width: 340px !important;
    transform: translateX(100%) !important;
    border-right: none !important;
    border-left: 1px solid rgba(255,255,255,0.1) !important;
    padding: 5rem 2rem 2rem !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    background: rgba(9,9,9,0.97) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    gap: 0 !important;
    overflow-y: auto !important;
  }
  .mobile-nav.open {
    transform: translateX(0) !important;
  }

  /* Links do menu maiores, sem uppercase agressivo */
  .mobile-nav a {
    min-height: 48px !important;
    font-size: 1.08rem !important;
    letter-spacing: 0.06em !important;
    padding: 0.9rem 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    color: rgba(255,255,255,0.92) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .mobile-nav a::after {
    content: '→';
    font-size: 0.8rem;
    opacity: 0.35;
    font-family: sans-serif;
    font-weight: 300;
  }
  .mobile-nav a:hover { color: var(--red-text, #e8724a) !important; }
  .mobile-nav a:hover::after { opacity: 0.7; }

  /* CTA do menu */
  .mobile-nav .mobile-cta {
    margin-top: 1.5rem !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    border-bottom: none !important;
    min-height: 48px !important;
    padding: 0.9rem 1rem !important;
    font-size: 0.84rem !important;
  }
  .mobile-nav .mobile-cta::after { display: none !important; }

  /* Seletor de idioma — empurrado para baixo do CTA */
  .mobile-lang {
    order: 10;
    margin-top: 1.5rem;
    padding-top: 1.2rem !important;
    border-top: 1px solid rgba(255,255,255,0.07) !important;
    border-bottom: none !important;
    justify-content: flex-start !important;
    gap: 0.5rem !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  .mobile-lang a {
    min-height: 36px !important;
    padding: 8px 12px !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    width: auto !important;
    color: rgba(255,255,255,0.76) !important;
  }
  .mobile-lang a.active {
    border-color: rgba(255,255,255,0.35) !important;
    color: rgba(255,255,255,0.9) !important;
  }

  /* Hambúrguer: move para direita (já está lá no layout) */
  nav#main-nav {
    /* garante: logo ao centro, hamburger à direita */
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  /* hamburger à direita — remove o absolute do logo já feito em style.css */

}
