/* ============================================================
   QualiTab — Kit visual da versão mobile
   Usado por index-mobile.html, solucoes/*-mobile.html e blog/*-mobile.html
   ============================================================ */
:root {
  --m-orange: #e86236;
  --m-orange-dark: #d5522a;
  --m-orange-soft: #f6a186;
  --m-navy: #182945;
  --m-navy-deep: #141f33;
  --m-text: #363334;
  --m-muted: #6b6567;
  --m-faint: #8a8486;
  --m-cream: #fbf8f5;
  --m-line: #efe9e3;
  --m-line-strong: #e4ddd6;
  --m-gutter: 20px;
  --m-header-h: 60px;
  --m-radius: 18px;
  --m-safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--m-header-h) + 8px); -webkit-text-size-adjust: 100%; }
body { font-family: 'Archivo', system-ui, sans-serif; color: var(--m-text); background: #fff; -webkit-font-smoothing: antialiased; overflow-x: hidden; font-size: 16px; line-height: 1.55; }
body.m-lock { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, video { max-width: 100%; display: block; }
::selection { background: var(--m-orange); color: #fff; }

/* ---------- Tipografia / blocos ---------- */
.m-wrap { padding-left: var(--m-gutter); padding-right: var(--m-gutter); }
.m-section { padding: 56px var(--m-gutter); }
.m-section.is-cream { background: var(--m-cream); }
.m-section.is-navy { background: var(--m-navy); color: #fff; position: relative; overflow: hidden; }
.m-section.is-orange { background: var(--m-orange); color: #fff; position: relative; overflow: hidden; }
.m-grid-bg::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px); background-size: 24px 24px; pointer-events: none; }
.m-section > * { position: relative; }

.m-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--m-orange); letter-spacing: .08em; text-transform: uppercase; }
.m-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.is-navy .m-eyebrow { color: var(--m-orange-soft); }
.m-h1 { font-size: 34px; line-height: 1.08; font-weight: 800; color: var(--m-navy); letter-spacing: -0.03em; }
.m-h2 { font-size: 28px; line-height: 1.15; font-weight: 800; color: var(--m-navy); letter-spacing: -0.02em; margin-top: 10px; }
.is-navy .m-h2, .is-orange .m-h2 { color: #fff; }
.m-h3 { font-size: 18px; line-height: 1.25; font-weight: 700; color: var(--m-navy); }
.m-lead { font-size: 16px; line-height: 1.6; color: #5b5658; margin-top: 12px; }
.is-navy .m-lead { color: #b9c1ce; }
.m-accent { color: var(--m-orange); }

/* ---------- Botões ---------- */
.m-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 14px 22px; border-radius: 0; border: none; cursor: pointer; font-size: 16px; font-weight: 700; text-align: center; line-height: 1.2; transition: transform .15s ease, background .15s ease; }
.m-btn:active { transform: scale(.98); }
.m-btn-primary { background: var(--m-orange); color: #fff; box-shadow: 0 10px 24px -10px rgba(232,98,54,.55); }
.m-btn-primary:active { background: var(--m-orange-dark); }
.m-btn-outline { background: #fff; color: var(--m-navy); border: 1px solid var(--m-line-strong); }
.m-btn-ghost-light { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.m-btn-inline { width: auto; display: inline-flex; }
.m-btn-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.m-link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--m-orange); font-weight: 700; font-size: 15px; }

/* ---------- Header ---------- */
.m-header { position: sticky; top: 0; z-index: 80; height: var(--m-header-h); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid #f0ede9; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 var(--m-gutter); }
.m-header-logo img { height: 24px; width: auto; }
.m-header-actions { display: flex; align-items: center; gap: 2px; }
.m-header-back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--m-navy); padding: 10px; }
.m-icon-btn { width: 44px; height: 44px; border: none; background: none; border-radius: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--m-navy); }
.m-icon-btn:active { background: #f5f1ec; }
.m-burger { position: relative; width: 22px; height: 14px; }
.m-burger span { position: absolute; left: 0; width: 22px; height: 2px; border-radius: 0; background: var(--m-navy); transition: transform .25s ease, opacity .2s ease, top .25s ease; }
.m-burger span:nth-child(1) { top: 0; }
.m-burger span:nth-child(2) { top: 6px; }
.m-burger span:nth-child(3) { top: 12px; }
.m-menu-open .m-burger span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.m-menu-open .m-burger span:nth-child(2) { opacity: 0; }
.m-menu-open .m-burger span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* ---------- Menu (drawer em tela cheia) ---------- */
.m-drawer { position: fixed; inset: var(--m-header-h) 0 0 0; z-index: 79; background: #fff; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px var(--m-gutter) calc(28px + var(--m-safe-bottom)); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
.m-menu-open .m-drawer { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease; }
.m-drawer-link, .m-drawer summary { display: flex; align-items: center; justify-content: space-between; min-height: 54px; font-size: 18px; font-weight: 700; color: var(--m-navy); border-bottom: 1px solid #f2ede8; cursor: pointer; list-style: none; }
.m-drawer summary::-webkit-details-marker { display: none; }
.m-drawer summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--m-faint); border-bottom: 2px solid var(--m-faint); transform: rotate(45deg); margin-right: 6px; transition: transform .2s ease; }
.m-drawer details[open] summary::after { transform: rotate(-135deg); }
.m-drawer-sub { display: grid; grid-template-columns: 1fr; padding: 6px 0 12px; border-bottom: 1px solid #f2ede8; }
.m-drawer-sub a { display: flex; align-items: center; gap: 12px; min-height: 46px; font-size: 15px; font-weight: 500; color: var(--m-text); padding: 0 4px; border-radius: 0; }
.m-drawer-sub a:active { background: var(--m-cream); }
.m-drawer-sub img { width: 26px; height: 26px; object-fit: contain; border-radius: 0; flex-shrink: 0; }
.m-drawer-footer { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- Barra de ação fixa (rodapé da tela) ---------- */
.m-actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; gap: 10px; padding: 10px var(--m-gutter) calc(10px + var(--m-safe-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid #f0ede9; box-shadow: 0 -10px 30px -18px rgba(24,41,69,.35); transform: translateY(110%); transition: transform .3s cubic-bezier(.22,.61,.36,1); }
.m-actionbar.is-visible { transform: none; }
.m-actionbar .m-btn { min-height: 50px; font-size: 15px; }
.m-actionbar-wa { flex: 0 0 50px; width: 50px; height: 50px; border-radius: 50%; background: #25D366; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px -8px rgba(37,211,102,.7); }
.m-has-actionbar { padding-bottom: calc(76px + var(--m-safe-bottom)); }

/* ---------- Carrossel com scroll-snap ---------- */
.m-carousel { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 calc(var(--m-gutter) * -1); padding: 4px var(--m-gutter) 8px; scroll-padding: 0 var(--m-gutter); }
.m-carousel::-webkit-scrollbar { display: none; }
.m-carousel > * { scroll-snap-align: start; flex: 0 0 84%; }
.m-dots { display: flex; justify-content: center; gap: 7px; margin-top: 16px; }
.m-dots button { width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; background: #d8cfc7; cursor: pointer; transition: width .2s ease, background .2s ease; }
.m-dots button.is-active { width: 22px; border-radius: 0; background: var(--m-orange); }
.is-navy .m-dots button { background: rgba(255,255,255,.25); }
.is-navy .m-dots button.is-active { background: var(--m-orange); }

/* ---------- Cartões ---------- */
.m-card { background: #fff; border: 1px solid var(--m-line); border-radius: 0; padding: 20px; box-shadow: 0 4px 20px -12px rgba(24,41,69,.12); }
.m-card-navy { background: var(--m-navy); color: #fff; border-color: transparent; }

/* ---------- Acordeão ---------- */
.m-acc { border: 1px solid var(--m-line); border-radius: 0; background: #fff; overflow: hidden; }
.m-acc + .m-acc { margin-top: 10px; }
.m-acc summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; list-style: none; }
.m-acc summary::-webkit-details-marker { display: none; }
.m-acc summary::after { content: ""; margin-left: auto; flex-shrink: 0; width: 8px; height: 8px; border-right: 2px solid var(--m-faint); border-bottom: 2px solid var(--m-faint); transform: rotate(45deg); transition: transform .2s ease; }
.m-acc[open] summary::after { transform: rotate(-135deg); }
.m-acc-body { padding: 0 18px 18px; }
.m-checklist { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.m-checklist li { display: flex; gap: 9px; font-size: 14.5px; line-height: 1.45; color: var(--m-text); }
.m-checklist li::before { content: "✓"; color: var(--m-orange); font-weight: 800; flex-shrink: 0; }
.is-navy .m-checklist li { color: #dbe0e8; }

/* ---------- Vídeo (thumbnail que vira player) ---------- */
.m-video { position: relative; aspect-ratio: 16/9; border-radius: 0; overflow: hidden; background: #000; }
.m-video img, .m-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.m-play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; border: none; background: rgba(232,98,54,.95); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0,0,0,.45); z-index: 2; }

/* ---------- Rodapé ---------- */
.m-footer { background: var(--m-navy-deep); color: #c3cad6; padding: 44px var(--m-gutter) 28px; }
.m-footer-brand img { height: 24px; width: auto; }
.m-footer-brand p { font-size: 14px; color: #8b95a6; margin-top: 14px; line-height: 1.6; }
.m-social { display: flex; gap: 10px; margin-top: 18px; }
.m-social a { width: 44px; height: 44px; border-radius: 0; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center; }
.m-footer details { border-bottom: 1px solid rgba(255,255,255,.08); }
.m-footer details:first-of-type { margin-top: 28px; border-top: 1px solid rgba(255,255,255,.08); }
.m-footer summary { display: flex; align-items: center; justify-content: space-between; min-height: 54px; font-size: 13px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; list-style: none; }
.m-footer summary::-webkit-details-marker { display: none; }
.m-footer summary::after { content: "+"; font-size: 20px; font-weight: 400; color: #8b95a6; }
.m-footer details[open] summary::after { content: "−"; }
.m-footer-links { display: flex; flex-direction: column; padding-bottom: 14px; }
.m-footer-links a { min-height: 40px; display: flex; align-items: center; color: #9aa3b2; font-size: 15px; }
.m-footer-bottom { margin-top: 24px; font-size: 13px; color: #7a8494; display: flex; flex-direction: column; gap: 8px; }
.m-footer-bottom a { color: #9aa3b2; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Bottom sheet (formulário de demonstração) ---------- */
.m-sheet-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(24,41,69,.55); display: flex; align-items: flex-end; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility 0s linear .25s; }
.m-sheet-overlay.is-open { opacity: 1; visibility: visible; transition: opacity .25s ease; }
.m-sheet { width: 100%; max-height: 94vh; max-height: 94dvh; background: #fff; border-radius: 0; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .32s cubic-bezier(.22,.61,.36,1); }
.m-sheet-overlay.is-open .m-sheet { transform: none; }
.m-sheet-grab { width: 40px; height: 5px; border-radius: 0; background: #e4ddd6; margin: 10px auto 0; flex-shrink: 0; }
.m-sheet-head { padding: 12px var(--m-gutter) 14px; border-bottom: 1px solid #f0ede9; flex-shrink: 0; }
.m-sheet-body { padding: 20px var(--m-gutter); overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; overscroll-behavior: contain; }
.m-sheet-foot { padding: 12px var(--m-gutter) calc(12px + var(--m-safe-bottom)); border-top: 1px solid #f0ede9; flex-shrink: 0; }
.m-label { display: block; font-size: 15px; font-weight: 700; color: var(--m-navy); line-height: 1.4; }
.m-label .req { color: var(--m-orange); }
.m-input { width: 100%; margin-top: 8px; min-height: 52px; padding: 14px 16px; border: 1px solid var(--m-line-strong); border-radius: 0; font-family: inherit; font-size: 16px; color: var(--m-text); outline: none; background: #fff; -webkit-appearance: none; appearance: none; }
.m-input:focus { border-color: var(--m-orange); box-shadow: 0 0 0 3px rgba(232,98,54,.12); }
.m-hint { font-size: 13px; color: #9a938c; margin-top: 4px; }

/* ---------- Utilidades ---------- */
.m-chip-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--m-gutter) * -1); padding: 2px var(--m-gutter); }
.m-chip-row::-webkit-scrollbar { display: none; }
.m-desktop-link { display: block; text-align: center; font-size: 13px; color: #7a8494; padding: 16px 0 0; text-decoration: underline; text-underline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Telas largas: a versão mobile sempre aparece na largura de um celular ---------- */
@media (min-width: 600px) {
  :root { --m-frame: 430px; --m-frame-side: calc(50% - (var(--m-frame) / 2)); }
  html { background: #e9e5e0; }
  body { max-width: var(--m-frame); margin: 0 auto; min-height: 100vh; box-shadow: 0 0 60px -10px rgba(24,41,69,.25); }
  .m-actionbar, .m-drawer { left: var(--m-frame-side) !important; right: var(--m-frame-side) !important; }
  .m-sheet, .s-demo-overlay > *, .b-progress { max-width: var(--m-frame); margin-left: auto; margin-right: auto; }
}
