/* Market Cortex — estilos compartilhados (landing e área do assinante).
   Tokens e medidas vêm do handoff de design (design_handoff_market_cortex_site/README.md). */

:root {
	color-scheme: dark;
	--bg: #0B0D10;
	--surface: #0E1115;
	--strip: #080A0C;
	--border: #1F262E;
	--border-soft: #1A2027;
	--border-strong: #2A333D;
	--hover: #141A20;

	--text: #E8ECEF;
	--text-2: #C4CDD5;
	--text-2b: #B7C1CA;
	--text-3: #AAB4BE;
	--muted: #8B97A3;
	--muted-2: #6B7682;
	--dash: #4A5561;

	--cyan: #4CC2FF;
	--cyan-hover: #7FD5FF;
	--on-cyan: #06131B;
	--green: #81C784;
	--red: #E57373;
	--amber: #FFB74D;
	--lilac: #B39DDB;
	--grey: #9AA4AE;
	--wa: #25D366;
	--on-wa: #06210F;

	--serif: "Instrument Serif", Georgia, serif;
	--sans: "IBM Plex Sans", system-ui, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #9BE1FF; text-decoration: underline; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
input, select, button, textarea { font-family: inherit; }
img { max-width: 100%; }

.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); font-weight: 400; }
.nowrap { white-space: nowrap; }

/* ---------- Botões ---------- */
.btn {
	height: 48px; padding: 0 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-size: 16px; text-decoration: none; cursor: pointer; border: 1px solid transparent; background: transparent; color: var(--text);
	white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--cyan); color: var(--on-cyan); font-weight: 600; }
.btn-primary:hover { background: var(--cyan-hover); color: var(--on-cyan); }
.btn-outline { border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { background: var(--hover); color: var(--text); }
.btn-danger-outline { border-color: #4A2A2A; color: #F2A5A5; }
.btn-danger-outline:hover { background: #1C1212; color: #F2A5A5; }
.btn-danger { background: #C94A4A; color: #FFFFFF; font-weight: 600; }
.btn-danger:hover { background: #D65A5A; color: #FFFFFF; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; }
.btn-md { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-xs { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
button.btn { line-height: normal; }

/* ---------- Menu superior ---------- */
.mc-nav { position: sticky; top: 0; z-index: 20; background: #0B0D10E6; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-soft); }
.mc-nav__inner { max-width: 1200px; margin: 0 auto; padding: 0 28px; height: 64px; display: flex; align-items: center; gap: 28px; }
.mc-brand { flex: none; white-space: nowrap; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.mc-brand:hover { color: var(--text); text-decoration: none; }
.mc-brand span { font-weight: 600; font-size: 16px; letter-spacing: .01em; }
.mc-nav__links { flex: 1; min-width: 0; display: flex; justify-content: flex-end; gap: 22px; font-size: 14px; white-space: nowrap; overflow: hidden; }
.mc-nav__links a { color: var(--text-3); }
.mc-nav__links a:hover { color: var(--text); text-decoration: none; }
.mc-nav .btn-sm { flex: none; }
.mc-nav .btn-sm.btn-primary { padding: 0 16px; }

/* Menu da área do assinante */
.mc-topbar { height: 64px; flex: none; border-bottom: 1px solid var(--border-soft); }
.mc-topbar__inner { max-width: 1120px; height: 100%; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; gap: 16px; }
.mc-topbar__sep { color: var(--dash); }
.mc-topbar__crumb { color: var(--muted); white-space: nowrap; }
.mc-topbar__user { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mc-topbar__email { color: var(--text-3); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-topbar a.mc-topbar__plans { font-size: 14px; color: var(--text-3); }

/* ---------- Seções ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.band { border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); background: var(--surface); }
.band-top { border-top: 1px solid var(--border-soft); background: var(--surface); }
.stack { display: flex; flex-direction: column; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 52px); line-height: 1.08; text-wrap: balance; }
.h2-sm { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.1; text-wrap: balance; }
.lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text-3); text-wrap: pretty; }
.head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }

/* Lista com linhas separadas por borda (testes, falhas, auditorias) */
.rows { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.rows > div { padding: 16px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; }
.rows > div > b { font-size: 16px; font-weight: 500; }
.rows > div > span { font-size: 15px; line-height: 1.6; color: var(--text-3); text-wrap: pretty; }
.rows--sm > div { padding: 13px 0; border-bottom-color: var(--border-soft); gap: 4px; }
.rows--sm > div > b { font-size: 15px; }
.rows--sm > div > span { font-size: 14px; }

/* ---------- Rodapé ---------- */
.mc-footer { border-top: 1px solid var(--border-soft); background: var(--strip); }
.mc-footer__inner { max-width: 1200px; margin: 0 auto; padding: 44px 28px 56px; display: flex; flex-direction: column; gap: 18px; }
.mc-footer__top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.mc-footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.mc-footer__links a { color: var(--muted); }
.mc-footer__legal { font-size: 12px; line-height: 1.7; color: var(--muted-2); max-width: 980px; display: flex; flex-direction: column; gap: 8px; }
.mc-footer__legal p { margin: 0; }
.mc-footer__company { color: var(--muted); }

/* ---------- Páginas legais (termos, privacidade) ---------- */
.legal { max-width: 820px; padding-top: 64px; padding-bottom: 96px; font-size: 16px; line-height: 1.7; color: var(--text-2); }
.legal__head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.legal__date { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.legal h2 { margin: 40px 0 10px; font-size: 20px; font-weight: 500; color: var(--text); }
.legal p { margin: 0 0 14px; text-wrap: pretty; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal b { color: var(--text); font-weight: 500; }
.legal__table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 14px; line-height: 1.55; }
.legal__table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.legal__table td { vertical-align: top; padding: 10px; border-bottom: 1px solid var(--border-soft); }
.legal__table td:first-child { color: var(--text); width: 36%; }
@media (max-width: 720px) {
	.legal { padding-top: 40px; }
	.legal__table, .legal__table tbody, .legal__table tr, .legal__table td { display: block; width: 100%; }
	.legal__table thead { display: none; }
	.legal__table tr { padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
	.legal__table td { border: 0; padding: 2px 0; }
	.legal__table td:first-child { width: 100%; }
	.legal__table td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); }
}

/* ---------- Botão flutuante do WhatsApp ---------- */
.wa-fab {
	position: fixed; right: 24px; bottom: 24px; z-index: 40; height: 56px; padding: 0 20px 0 16px; border-radius: 28px;
	background: var(--wa); color: var(--on-wa); display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px;
	text-decoration: none; box-shadow: 0 8px 24px #00000066;
}
.wa-fab:hover { background: #3BE07A; color: var(--on-wa); text-decoration: none; }
.wa-fab svg { flex: none; }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.input {
	height: 46px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface);
	color: var(--text); font-size: 15px; outline: none; width: 100%;
}
.input:focus { border-color: var(--cyan); }
.input-sm { height: 42px; padding: 0 12px; background: var(--bg); }
select.input { padding: 0 10px; font-size: 14px; }

/* Mensagens */
.note { font-size: 14px; line-height: 1.55; border-radius: 6px; padding: 12px 14px; border: 1px solid; }
.note-ok { color: #A8E6AC; border-color: #27402C; background: #101A13; }
.note-warn { color: #FFCE85; border-color: #4A3A1E; background: #1A150C; line-height: 1.6; }
.note-err { color: #F2A5A5; border-color: #4A2A2A; background: #120D0D; }
.msg-err { font-size: 14px; color: var(--red); }
.msg-ok { font-size: 14px; color: var(--green); }

@media (max-width: 720px) {
	.mc-nav__inner, .mc-topbar__inner { padding: 0 16px; gap: 14px; }
	.mc-nav__links { display: none; }
	.mc-nav__inner .mc-nav__spacer { display: block; flex: 1; }
	.wrap { padding-left: 16px; padding-right: 16px; }
	.mc-footer__inner { padding-left: 16px; padding-right: 16px; }
	.wa-fab { right: 16px; bottom: 16px; padding: 0 16px; }
	.wa-fab span { display: none; }
	.mc-topbar__crumb, .mc-topbar__sep { display: none; }
}
@media (min-width: 721px) { .mc-nav__spacer { display: none; } }
