/* ============================================================
   ORIGO CONSULT — Design System
   Derivado fielmente do Origo Brand Book v1.2
   Tokens, tipografia e componentes. Não usar #000 nem #FFF.
   ============================================================ */

:root {
  color-scheme: light only;

  /* — Paleta oficial — */
  --ink: #0E1726;
  --ink-soft: #1A2333;
  --canvas: #F5F0E8;
  --canvas-warm: #EDE6DA;
  --clay: #D86F45;
  --clay-deep: #A85333;
  --fog: #8B8578;
  --muted: #4A5260;
  --muted-on-ink: #B8B5AB;

  /* — Réguas — */
  --rule: rgba(14, 23, 38, 0.20);
  --rule-strong: rgba(14, 23, 38, 0.40);
  --rule-on-ink: rgba(245, 240, 232, 0.20);

  /* — Tipografia — */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* — Espaço — */
  --page-max: 1080px;
  --page-pad: 48px;
  --section-y: 120px;
}

@media (max-width: 720px) {
  :root { --page-pad: 24px; --section-y: 72px; }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background-color: #F5F0E8;
  color-scheme: light only;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Blindar contra dark mode automático — a marca é light-only */
@media (prefers-color-scheme: dark) {
  html, body { background-color: #F5F0E8 !important; color: #0E1726 !important; }
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--clay); color: var(--canvas); }
img, svg { max-width: 100%; }

/* Marca d'água — símbolo Origo (sparkle) fixo no fundo, discreto.
   Opacidade baixíssima para reforçar a marca sem competir com o texto. */
body::before {
  content: '';
  position: fixed;
  right: -8vw;
  bottom: -8vw;
  width: 62vw;
  height: 62vw;
  max-width: 720px;
  max-height: 720px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='36' fill='none' stroke='%230E1726' stroke-width='2.25'/%3E%3Cpath d='M 50 26 L 53 47 L 74 50 L 53 53 L 50 74 L 47 53 L 26 50 L 47 47 Z' fill='%230E1726'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
/* Conteúdo acima da marca d'água */
.site-header, section, .site-footer, article, .wa-float { position: relative; z-index: 1; }
.invert, .callout, .site-footer { isolation: isolate; }

/* ---------- Layout ---------- */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--rule);
}

.invert {
  background: var(--ink);
  color: var(--canvas);
  border-top-color: var(--rule-on-ink);
}
.invert .eyebrow { color: var(--clay); }
.invert .lede, .invert p.muted { color: var(--muted-on-ink); }

/* ---------- Tipografia ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay-deep);
  margin: 0 0 16px;
}

h1, h2, h3 { font-weight: 400; letter-spacing: -0.025em; margin: 0; }

.display {
  font-family: var(--serif);
  font-size: clamp(44px, 8vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-variation-settings: "SOFT" 100;
  color: var(--ink);
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.0;
  font-variation-settings: "SOFT" 100;
}
.sub-title {
  font-family: var(--serif);
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2.2vw, 24px);
  color: var(--muted);
  line-height: 1.5;
  max-width: 56ch;
  margin: 20px 0 0;
}
p { font-size: 17px; line-height: 1.65; }
p.muted { color: var(--muted); }
strong { font-weight: 600; }

.section-header { margin-bottom: 56px; max-width: 760px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 15px 28px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--clay); border-color: var(--clay); color: var(--ink); }
.btn-primary:hover { background: var(--clay-deep); border-color: var(--clay-deep); color: var(--canvas); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--canvas); }
.invert .btn-ghost { border-color: var(--canvas); color: var(--canvas); }
.invert .btn-ghost:hover { background: var(--canvas); color: var(--ink); }

/* Botões sobre fundo escuro (.invert e .callout): CTA primário com texto Canvas
   para contraste AA; ghost com contorno claro. */
.invert .btn-primary,
.callout .btn-primary {
  background: var(--clay); border-color: var(--clay); color: var(--canvas);
}
.invert .btn-primary:hover,
.callout .btn-primary:hover {
  background: var(--clay-deep); border-color: var(--clay-deep); color: var(--canvas);
}
.callout .btn-ghost { border-color: var(--canvas); color: var(--canvas); }
.callout .btn-ghost:hover { background: var(--canvas); color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 240, 232, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}
.nav-logo svg, .nav-logo img { height: 48px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
/* CTA do nav: MESMA cor de texto do botão "Falar no WhatsApp" — Ink puro sobre Clay */
.nav-cta {
  font-size: 14px !important; padding: 11px 20px;
  color: var(--ink) !important; border-color: var(--clay);
}
.nav-cta:hover { background: var(--clay-deep); border-color: var(--clay-deep); color: var(--canvas) !important; }

/* — Botão hamburger (injetado por nav.js; escondido no desktop) — */
.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  padding: 0; margin: 0;
  background: transparent; border: 0; cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { display: block; width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }

@media (max-width: 720px) {
  .nav { height: 68px; }
  .nav-logo svg, .nav-logo img { height: 34px; }

  .nav-toggle { display: inline-flex; }

  /* nav-links vira um painel deslizante (drawer) abaixo do header */
  .nav-links {
    position: fixed;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 24px;
    background: rgba(245, 240, 232, 0.98);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 12px 24px rgba(14, 23, 38, 0.10);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    z-index: 49;
  }
  .site-header.nav-open .nav-links {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-links a:not(.nav-cta) {
    padding: 16px 4px;
    font-size: 17px;
    border-bottom: 1px solid var(--rule);
  }
  .nav-links .nav-cta {
    margin-top: 18px;
    text-align: center;
    font-size: 16px !important;
    padding: 14px 20px;
  }
  /* alterna os ícones quando o menu está aberto */
  .site-header.nav-open .nav-toggle .icon-open { display: none; }
  .site-header.nav-open .nav-toggle .icon-close { display: block; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(72px, 12vh, 140px) 0 var(--section-y); border-top: none; }
.hero .display { max-width: 16ch; }
.hero .lede { max-width: 52ch; font-size: clamp(20px, 2.6vw, 26px); }

/* Home centralizada — só sob body.home-centered (não afeta outras páginas) */
.home-centered section { text-align: center; }
.home-centered .hero .display,
.home-centered .hero .lede,
.home-centered .section-header { margin-left: auto; margin-right: auto; }
.home-centered .btn-row { justify-content: center; }
/* divs de corpo com max-width inline: centraliza a coluna */
.home-centered section > .page > div[style*="max-width"] { margin-left: auto; margin-right: auto; }
/* grids de componentes (cards/steps) voltam a alinhar seu conteúdo à esquerda para não quebrar */
.home-centered .card,
.home-centered .step,
.home-centered .layer,
.home-centered .faq,
.home-centered .field { text-align: left; }
.hero-note {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fog);
  margin-top: 28px;
}

/* ---------- Grid de camadas ---------- */
.layers { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 48px; }
.layer {
  background: var(--canvas);
  padding: 36px 32px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  align-items: start;
}
.layer-num {
  font-family: var(--mono);
  font-size: 13px; font-weight: 600;
  color: var(--clay-deep); letter-spacing: 0.06em;
  padding-top: 6px;
}
.layer h3 { font-family: var(--serif); font-size: 26px; font-weight: 500; margin-bottom: 6px; }
.layer p { font-size: 16px; color: var(--muted); margin: 0; }
@media (max-width: 720px) {
  .layer { grid-template-columns: 1fr; gap: 8px; padding: 28px 22px; }
}

/* ---------- Cards genéricos ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 44px; }
.card { border-top: 2px solid var(--ink); padding-top: 18px; }
.card .num { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--clay-deep); letter-spacing: 0.08em; }
.card h4 { font-family: var(--serif); font-size: 22px; font-weight: 500; margin: 6px 0 10px; }
.card p { font-size: 15px; color: var(--muted); margin: 0; line-height: 1.55; }
.invert .card { border-top-color: var(--canvas); }
.invert .card p { color: var(--muted-on-ink); }

/* ---------- Steps (como funciona) ---------- */
.steps { display: grid; gap: 0; margin-top: 40px; border-top: 1px solid var(--rule); }
.step { display: grid; grid-template-columns: 72px 1fr; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.step-num { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--clay-deep); letter-spacing: 0.06em; }
.step h4 { font-family: var(--sans); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
.step p { font-size: 16px; color: var(--muted); margin: 0; }
@media (max-width: 720px) { .step { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Callout ---------- */
.callout { background: var(--ink); color: var(--canvas); padding: 56px 48px; margin: 48px 0; border-radius: 6px; }
.callout .eyebrow { color: var(--clay); }
.callout p { font-family: var(--serif); font-size: clamp(22px, 3vw, 30px); line-height: 1.4; margin: 0; letter-spacing: -0.015em; }
@media (max-width: 720px) { .callout { padding: 36px 28px; } }

/* ---------- FAQ ---------- */
.faq { margin-top: 40px; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); padding: 24px 0; }
.faq summary {
  font-family: var(--serif); font-size: clamp(19px, 2.4vw, 24px); font-weight: 500;
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; align-items: center;
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--mono); color: var(--clay-deep); font-size: 26px; font-weight: 400; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 16px 0 0; max-width: 68ch; }

/* ---------- Form ---------- */
.form-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 860px) { .form-wrap { grid-template-columns: 1fr; gap: 40px; } }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 8px; color: var(--muted); text-transform: uppercase; font-family: var(--mono); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 16px; color: var(--ink);
  background: var(--canvas); border: 1.5px solid var(--rule-strong); border-radius: 4px;
  padding: 13px 15px; transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--clay); }
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 13px; color: var(--fog); margin-top: 14px; }
.form-status { margin-top: 16px; font-size: 15px; font-weight: 500; display: none; }
.form-status.ok { display: block; color: var(--clay-deep); }
.form-status.err { display: block; color: #A8332B; }

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--clay); color: var(--ink);
  padding: 13px 20px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  box-shadow: 0 6px 24px rgba(14,23,38,0.18);
  transition: transform 0.15s, background 0.2s, color 0.2s;
}
.wa-float:hover { transform: translateY(-2px); background: var(--clay-deep); color: var(--canvas); }
@media (max-width: 720px) { .wa-float span { display: none; } .wa-float { padding: 14px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--canvas); padding: 72px 0 48px; border-top: none; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.footer-grid h5 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--clay); margin: 0 0 16px; font-weight: 600; }
.footer-grid a, .footer-grid p { display: block; color: var(--muted-on-ink); font-size: 15px; margin: 0 0 10px; transition: color 0.2s; }
.footer-grid a:hover { color: var(--canvas); }
.footer-bottom { border-top: 1px solid var(--rule-on-ink); padding-top: 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-on-ink); }
.footer-brand-sig { font-family: var(--mono); font-size: 11px; color: var(--muted-on-ink); letter-spacing: 0.04em; }

/* ---------- Blog ---------- */
.blog-filter { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 20px; }
.blog-filter-btn {
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
  background: transparent; border: 1px solid var(--rule); border-radius: 999px;
  padding: 9px 18px; cursor: pointer; transition: all 0.18s ease;
}
.blog-filter-btn:hover { border-color: var(--rule-strong); color: var(--ink); }
.blog-filter-btn.is-active { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.blog-count { text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fog); margin: 0 0 8px; }
.blog-empty { text-align: center; color: var(--muted); font-family: var(--serif); font-size: 20px; padding: 48px 0; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; margin-top: 32px; }
.post-card { border: 1px solid var(--rule); background: var(--canvas-warm); padding: 32px 28px; border-radius: 6px; transition: transform 0.15s, border-color 0.2s; display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-2px); border-color: var(--rule-strong); }
.post-card .tag { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--clay-deep); font-weight: 600; }
.post-card h3 { font-family: var(--serif); font-size: 24px; font-weight: 500; margin: 12px 0; letter-spacing: -0.015em; line-height: 1.15; }
.post-card p { font-size: 15px; color: var(--muted); margin: 0 0 20px; flex-grow: 1; }
.post-card .read { font-size: 14px; font-weight: 600; color: var(--ink); }

/* Artigo */
.article { max-width: 720px; margin: 0 auto; }
.article .eyebrow { margin-top: 8px; }
.article h1 { font-family: var(--serif); font-size: clamp(34px, 6vw, 56px); line-height: 1.05; letter-spacing: -0.03em; margin: 12px 0 24px; font-variation-settings: "SOFT" 100; }
.article .meta { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fog); margin-bottom: 48px; }
.article h2 { font-family: var(--serif); font-size: clamp(26px, 3.6vw, 36px); font-weight: 500; letter-spacing: -0.02em; margin: 48px 0 16px; }
.article h3 { font-family: var(--sans); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; margin: 36px 0 12px; }
.article p { font-size: 18px; line-height: 1.7; margin: 0 0 1.2em; text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; }
.article ul, .article ol { font-size: 18px; line-height: 1.7; padding-left: 24px; margin: 0 0 1.2em; }
.article li { margin-bottom: 8px; text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; }
/* Não justificar em telas estreitas: evita "rios" de espaço em coluna curta */
@media (max-width: 620px) {
  .article p, .article li { text-align: left; hyphens: manual; -webkit-hyphens: manual; }
}
.article blockquote { border-left: 3px solid var(--clay); padding-left: 24px; margin: 32px 0; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--muted); }
.article a { color: var(--clay-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.article .post-table { width: 100%; border-collapse: collapse; margin: 32px 0; font-size: 16px; }
.article .post-table th { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--clay-deep); text-align: left; padding: 12px 16px; border-bottom: 2px solid var(--ink); }
.article .post-table td { padding: 14px 16px; border-bottom: 1px solid var(--rule); line-height: 1.5; vertical-align: top; }
.article .post-table tr:last-child td { border-bottom: none; }
.article .post-table td:first-child { font-weight: 600; white-space: nowrap; }
@media (max-width: 620px) { .article .post-table { font-size: 14px; } .article .post-table th, .article .post-table td { padding: 10px 10px; } }

/* Disclaimer YMYL */
.ymyl-disclaimer {
  font-size: 14px; line-height: 1.6; color: var(--muted);
  background: var(--canvas-warm); border: 1px solid var(--rule);
  border-radius: 6px; padding: 16px 20px; margin: 40px 0 0;
}
/* Bio do autor (E-E-A-T) */
.author-bio {
  display: flex; gap: 20px; align-items: flex-start;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 28px 0; margin: 40px 0 0;
}
.author-bio-mark { flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%; background: var(--canvas-warm); display: flex; align-items: center; justify-content: center; }
.author-bio-name { font-family: var(--serif); font-size: 20px; font-weight: 500; margin: 0 0 4px; }
.author-bio-text { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; max-width: 62ch; }
.author-bio-text a { color: var(--clay-deep); font-weight: 600; white-space: nowrap; }

/* Foto do autor na página Sobre */
.about-hero { display: flex; align-items: center; gap: 40px; }
.about-hero-text { flex: 1; min-width: 0; }
.about-photo {
  width: 200px; height: 200px; flex-shrink: 0;
  border-radius: 50%; object-fit: cover;
  border: 3px solid var(--canvas-warm);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
@media (max-width: 620px) {
  .about-hero { flex-direction: column; align-items: flex-start; gap: 24px; text-align: left; }
  .about-photo { width: 140px; height: 140px; }
}

/* Utilidades */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.divider { height: 1px; background: var(--rule); border: none; margin: 0; }
