/* =========================================================
   M7 Group · LP de cadastro (base editorial)
   Montserrat · paleta oficial · temas Light (Platinum) e Dark (Grafite)
   Tema escolhido em assets/config.js → TEMA: "light" | "dark"
   ========================================================= */
:root {
  --preto: #141618;
  --grafite: #1e2228;
  --grafite-2: #242629;
  --gold: #c7a581;
  --laranja: #ff3c00;
  --amarelo: #fcc352;
  --platinum: #f6f5f2;
  --light-gray: #ededed;
  --input-bg: #f2f3f5;

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --container: 1200px;
  --gutter: 120px;
}

/* ---------- Tokens por tema ---------- */
:root, [data-theme="light"] {
  --bg: var(--platinum);
  --bg-alt: var(--platinum);
  --bg-form: var(--light-gray);
  --ink: var(--preto);
  --ink-soft: #2b2e33;
  --muted: #55595f;
  --line: var(--preto);
  --line-soft: rgba(20, 22, 24, .18);
  --field-bg: var(--input-bg);
  --field-ink: var(--preto);
  --field-border: var(--preto);
  --field-placeholder: #3a3d42;
  --box-off-bg: var(--preto);
  --box-off-border: var(--preto);
}
[data-theme="dark"] {
  --bg: var(--preto);
  --bg-alt: var(--grafite-2);
  --bg-form: var(--preto);
  --ink: var(--platinum);
  --ink-soft: #e4e2dd;
  --muted: #b9bcc1;
  --line: rgba(246, 245, 242, .55);
  --line-soft: rgba(246, 245, 242, .18);
  --field-bg: var(--platinum);
  --field-ink: var(--preto);
  --field-border: var(--platinum);
  --field-placeholder: #6b6e73;
  --box-off-bg: transparent;
  --box-off-border: var(--platinum);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/26px var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 56px; line-height: 64px; font-weight: 600; letter-spacing: -0.04em; }
h2 { font-size: 40px; line-height: 48px; font-weight: 400; letter-spacing: -0.04em; }
h3 { font-size: 36px; line-height: 42px; font-weight: 500; letter-spacing: -0.04em; }
h4 { font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -0.02em; }
.small { font-size: 14px; line-height: 22px; }
.muted { color: var(--muted); }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 12px; line-height: 18px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 20px; }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--laranja); flex: none; }
.eyebrow-plain::before { display: none; }
.accent-bar { display: block; width: 64px; height: 4px; background: var(--laranja); margin-bottom: 36px; }

/* ---------- Botões (5 estados) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 56px; padding: 16px 24px; border: 2px solid transparent; border-radius: 0;
  font: 600 14px/20px var(--font); letter-spacing: .01em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--laranja); color: #fff; }
.btn-primary:hover { background: var(--gold); color: #fff; }
.btn-primary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn-primary:active { background: var(--laranja); border-color: var(--preto); }
.btn-primary[disabled] { background: #ffb39b; color: #fff; cursor: not-allowed; }
[data-theme="dark"] .btn-primary[disabled] { background: #7a2a12; color: rgba(255,255,255,.55); }
.btn-secondary { background: var(--amarelo); color: var(--preto); }
.btn-secondary:hover { background: var(--gold); }
.btn-secondary:focus-visible { outline: 2px solid var(--platinum); outline-offset: 3px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header { background: var(--bg); }
.header-inner { display: flex; align-items: center; gap: 32px; padding-top: 56px; padding-bottom: 48px; position: relative; }
.header-inner::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: 1px; background: var(--line); }
.brand { flex: none; display: block; }
.brand img { width: 236px; height: auto; }
.logo-on-dark { display: none !important; }
[data-theme="dark"] .logo-on-light { display: none !important; }
[data-theme="dark"] .logo-on-dark { display: block !important; }
.nav { display: flex; gap: 33px; margin: 0 auto; }
.nav a { font-size: 15px; line-height: 20px; font-weight: 500; text-decoration: none; }
.nav a:hover { color: var(--laranja); }
.btn-header { min-height: 56px; padding: 16px 22px; font-size: 15px; text-transform: none; letter-spacing: 0; }

/* ---------- Hero ---------- */
.hero { padding: 112px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1fr 464px; gap: 64px; align-items: start; }
.hero h1 { max-width: 600px; font-size: 60px; line-height: 64px; }
.hero-cta { margin-top: 52px; }
.hero-aside { padding-top: 8px; }
.hero-sub { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.02em; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.hero-text { margin-top: 32px; }

.hero-photo { margin: 0; }
.hero-photo img { width: 100%; height: clamp(280px, 56.25vw, 810px); object-fit: cover; object-position: 50% 30%; }

/* ---------- Seções ---------- */
.section { padding: 48px 0 112px; }
.section-alt { background: var(--bg-alt); }
.section-ink { background: var(--preto); color: var(--platinum); padding: 96px 0; }

.intro-grid { display: grid; grid-template-columns: 1fr 508px; gap: 64px; align-items: start; }
.intro-grid h2 { font-size: 40px; line-height: 48px; }
.intro-text { font-size: 18px; line-height: 28px; font-weight: 500; padding-top: 34px; }
.title-accent { color: var(--laranja); margin: 80px 0 32px; font-size: 36px; line-height: 42px; font-weight: 500; }

.solutions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
.solution { border-top: 1px solid var(--line); padding: 24px 0 96px; }
.solution .num { display: block; color: var(--laranja); font-size: 12px; line-height: 18px; font-weight: 600; margin-bottom: 28px; }
.solution h4 { margin-bottom: 20px; max-width: 360px; }
.solution-wide h4 { max-width: none; }
.solution p { font-weight: 500; max-width: 370px; }
.solution:nth-child(n+4) p { font-weight: 400; }
.solution:nth-child(n+4) { padding-bottom: 8px; }
.solution-wide { grid-column: span 2; }
.solution-wide p { max-width: none; }

/* M7 Education */
.edu-grid { display: grid; grid-template-columns: 1fr 584px; gap: 32px; }
.edu-left { display: flex; flex-direction: column; justify-content: space-between; gap: 96px; }
.edu-logo { width: 340px; height: 82px; object-fit: cover; object-position: 50% 50%; margin-left: -6px; }
.edu-title { font-size: 40px; line-height: 48px; font-weight: 500; color: var(--platinum); max-width: 540px; }
.gold { color: var(--gold); }
.edu-sub { color: var(--gold); font-size: 32px; line-height: 32px; font-weight: 600; letter-spacing: -0.02em; margin: 6px 0 56px; }
.edu-right p { color: #e6e4df; }
.edu-right .btn { margin-top: 52px; }

/* Estrutura */
#estrutura { padding-top: 104px; padding-bottom: 48px; }
#estrutura h2 { max-width: 1100px; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin-top: 72px; }
.pillar { border-top: 1px solid var(--line); padding: 32px 0 72px; }
.pillar h4 { margin-bottom: 20px; }
.pillar p { max-width: 540px; }

/* ---------- Formulário ---------- */
.section-form { background: var(--bg-form); padding: 104px 0 96px; }
.form-container { width: 100%; max-width: calc(792px + 2 * 16px); margin: 0 auto; padding: 0 16px; }
@media (max-width: 1100px) { .form-container { max-width: calc(792px + 2 * var(--gutter)); padding: 0 var(--gutter); } }
.section-form h2 { font-size: 44px; line-height: 52px; font-weight: 600; letter-spacing: -0.04em; max-width: 680px; }
.form-lead { margin-top: 20px; font-size: 18px; line-height: 28px; max-width: 720px; }
#leadForm { margin-top: 56px; }
.req-note { margin-bottom: 24px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.field { display: flex; flex-direction: column; margin-bottom: 8px; }
.field label, .group legend { font-size: 14px; line-height: 20px; font-weight: 500; margin-bottom: 10px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 58px; padding: 16px 15px; border: 1px solid var(--field-border); border-radius: 0;
  background: var(--field-bg); color: var(--field-ink); font: 400 16px/24px var(--font);
  transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.field textarea { min-height: 112px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--field-placeholder); opacity: 1; }
.field input.ph-small::placeholder { font-size: 14px; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; border-right: 1.5px solid var(--field-ink); border-bottom: 1.5px solid var(--field-ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.field select { padding-right: 52px; cursor: pointer; }
.field select:invalid { color: var(--field-placeholder); }
.field select option { color: var(--preto); }

/* foco */
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--preto); box-shadow: inset 0 0 0 1px var(--preto); }
[data-theme="dark"] .field input:focus, [data-theme="dark"] .field select:focus, [data-theme="dark"] .field textarea:focus { border-color: var(--laranja); box-shadow: inset 0 0 0 1px var(--laranja); }
/* erro / válido / desabilitado */
.msg { min-height: 16px; padding-top: 4px; font-size: 12px; line-height: 18px; font-weight: 500; }
.field.is-error input, .field.is-error select, .field.is-error textarea { border-color: var(--laranja); box-shadow: inset 0 0 0 1px var(--laranja); }
.is-error > .msg, .group.is-error > .msg { color: var(--laranja); }
.field.is-valid .msg { color: var(--muted); }
.field input:disabled, .field select:disabled, .field textarea:disabled { background: transparent; border-color: #c9c9c9; color: #9a9a9a; cursor: not-allowed; }
[data-theme="dark"] .field input:disabled { background: #777; border-color: #777; }

.rule { border: 0; border-top: 1px solid var(--line); margin: 24px 0 40px; }
.group { border: 0; padding: 0; margin: 0; min-width: 0; }
.group legend { padding: 0; margin-bottom: 8px; }
.hint { margin-bottom: 28px; }
.checks { row-gap: 22px; }

/* checkbox custom */
.check { position: relative; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 22px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.check .box { flex: none; width: 20px; height: 20px; margin-top: 1px; background: var(--box-off-bg); border: 1.5px solid var(--box-off-border); position: relative; transition: background-color .12s; }
.check input:checked + .box { background: var(--laranja); border-color: var(--laranja); }
.check input:checked + .box::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check input:focus-visible + .box { outline: 2px solid var(--laranja); outline-offset: 3px; }
.check a { text-decoration: underline; text-underline-offset: 2px; }
.group.is-error .box { border-color: var(--laranja); }

.consent-title { font-size: 24px !important; line-height: 32px !important; font-weight: 400 !important; letter-spacing: -0.02em; margin-bottom: 18px !important; }
.consent-label { font-size: 14px; line-height: 20px; font-weight: 500; margin: 0 0 12px; }
.consent .check + .msg { margin-bottom: 14px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#submitBtn { margin-top: 28px; }

/* mensagem de validação + envio + sucesso */
.validation { border: 1px solid var(--laranja); background: var(--bg); padding: 20px 22px; margin-bottom: 32px; font-size: 14px; line-height: 22px; outline: none; }
.validation-title { color: var(--laranja); font-weight: 600; margin-bottom: 6px; }
.send-error { margin-top: 20px; color: var(--laranja); font-size: 14px; font-weight: 500; }
.success { margin-top: 48px; border: 1px solid var(--line); background: var(--bg); padding: 40px 36px; outline: none; }
.success h3 { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--preto); color: var(--platinum); padding: 80px 0 104px; }
.footer-grid { display: grid; grid-template-columns: 1fr 622px; gap: 32px; align-items: start; }
.footer-logo { width: 280px; }
.footer-title { font-size: 36px; line-height: 42px; font-weight: 500; letter-spacing: -0.04em; }
.footer-text { margin-top: 32px; font-weight: 500; }

/* ======================== Tablet (≤ 1100) ======================== */
@media (max-width: 1100px) {
  :root { --gutter: 32px; }
  .br-desk { display: none; }
  h1, .hero h1 { font-size: 44px; line-height: 52px; }
  h2, .intro-grid h2, .edu-title { font-size: 34px; line-height: 42px; }
  h3, .title-accent { font-size: 28px; line-height: 36px; }
  h4 { font-size: 24px; line-height: 32px; }
  .header-inner { padding-top: 40px; padding-bottom: 36px; gap: 20px; }
  .brand img { width: 200px; }
  .nav { gap: 22px; }
  .hero { padding: 72px 0 64px; }
  .hero-grid, .intro-grid, .edu-grid, .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-cta { margin-top: 36px; }
  .intro-text { padding-top: 0; }
  .solutions { grid-template-columns: 1fr 1fr; }
  .solution { padding-bottom: 56px; }
  .solution:nth-child(n+4) { padding-bottom: 56px; }
  .solution-wide { grid-column: span 2; }
  .edu-left { gap: 48px; }
  .edu-sub { font-size: 28px; line-height: 34px; margin-bottom: 28px; }
  .section-form h2 { font-size: 36px; line-height: 44px; }
  .footer-title { font-size: 30px; line-height: 38px; }
}

/* ======================== Celular (≤ 760) ======================== */
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; line-height: 26px; }
  h1, .hero h1 { font-size: 36px; line-height: 42px; }
  h2, .intro-grid h2, .edu-title, .section-form h2 { font-size: 28px; line-height: 36px; }
  h3, .title-accent { font-size: 24px; line-height: 32px; }
  h4 { font-size: 22px; line-height: 30px; }

  .header-inner { flex-wrap: wrap; padding-top: 24px; padding-bottom: 20px; gap: 24px 12px; }
  .brand img { width: 120px; }
  .btn-header { margin-left: auto; min-height: 48px; padding: 12px 14px; font-size: 14px; }
  .nav { order: 3; width: 100%; margin: 0; justify-content: space-between; gap: 12px; }
  .nav a { font-size: 14px; }

  .hero { padding: 56px 0 48px; }
  .hero-grid { gap: 24px; }
  .accent-bar { width: 48px; margin-bottom: 28px; }
  .hero-main { display: contents; }
  .hero-main h1 { order: 1; }
  .hero-aside { order: 2; padding-top: 0; }
  .hero-cta { order: 3; margin-top: 4px; width: 100%; }
  .accent-bar { order: 0; }
  .hero-sub { font-size: 18px; line-height: 28px; font-weight: 500; border-bottom: 0; padding-bottom: 0; }
  .hero-text { margin-top: 24px; }
  .hero-photo img { height: 210px; object-position: 55% 20%; }

  .section { padding: 40px 0 72px; }
  .section-ink { padding: 64px 0; }
  .intro-text { font-size: 16px; line-height: 26px; }
  .title-accent { margin: 48px 0 24px; }
  .solutions, .pillars { grid-template-columns: 1fr; }
  .solution, .solution:nth-child(n+4) { padding: 20px 0 40px; }
  .solution-wide { grid-column: auto; }
  .solution .num { margin-bottom: 16px; }
  .edu-logo { width: 240px; height: 58px; }
  .edu-sub { font-size: 22px; line-height: 30px; }
  .edu-right .btn { width: 100%; margin-top: 32px; }
  #estrutura { padding-top: 64px; }
  .pillars { margin-top: 40px; }
  .pillar { padding: 24px 0 40px; }

  .section-form { padding: 64px 0 64px; }
  .form-container { padding: 0 16px; max-width: none; box-sizing: border-box; }
  .form-lead { font-size: 16px; line-height: 26px; }
  #leadForm { margin-top: 36px; }
  .grid-2 { grid-template-columns: 1fr; }
  .checks { row-gap: 20px; }
  .check { font-weight: 500; }
  .success { padding: 28px 22px; }

  .site-footer { padding: 56px 0 72px; }
  .footer-logo { width: 190px; }
  .footer-title { font-size: 24px; line-height: 32px; }
  .footer-text { margin-top: 20px; font-size: 14px; line-height: 22px; font-weight: 400; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
[data-theme="dark"] .title-accent { color: var(--gold); }
/* rodapé: no celular, "M7 Group." numa linha e "Somos M Possibilidades." inteira na outra */
.br-mob { display: none; }
@media (max-width: 760px) {
  .br-mob { display: inline; }
  .footer-title .nowrap { white-space: nowrap; }
}
@media (max-width: 340px) { .footer-title .nowrap { white-space: normal; } }
