/*
 * Naturally Learn · estilo único do site, na marca Naturally.
 *
 * Paleta da marca (a mesma dos posts): tinta #141414, verde de ação #248F6D, papel #F7F5F0 e verde institucional #184230.
 * O verde institucional só aparece sobre fundo claro. Sobre fundo escuro entra o verde de ação (e uma versão mais clara dele,
 * --tint, para texto pequeno, que precisa de contraste 4,5:1). Tipografia: Manrope (licença OFL), copiada para /assets/fonts/ pelo
 * build do site; sem os arquivos, o navegador usa a fonte do sistema.
 * A logo oficial entra por /assets/marca.css (gerado pelo build a partir da pasta brand/). Veja brand/README.md.
 */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/manrope-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/manrope-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/manrope-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/manrope-800.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* A marca */
  --ink: #141414;
  --action: #248f6d;
  --paper: #f7f5f0;
  --institutional: #184230;
  --tint: #5bc29d; /* o verde de ação mais claro: só para texto sobre fundo escuro */

  /* Tema claro (padrão) */
  --bg: var(--paper);
  --surface: #ffffff;
  --field: #f7f5f0;
  --text: #2a2a28;
  --muted: #62625e;
  --line: #dedbd3;
  --head: var(--institutional);
  --link: var(--institutional);
  --btn-bg: var(--institutional);
  --btn-fg: var(--paper);
  --btn-bg-hover: var(--ink);
  --soft: #ebeee8;
  --dot: var(--action);
  --danger: #a33a2c;
  --danger-soft: #f8e7e4;
  --warn: #6f4700;
  --warn-soft: #f6ecd2;
  --focus: var(--action);
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 20, 20, 0.05), 0 12px 32px rgba(20, 20, 20, 0.06);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 44rem;
  --wide: 66rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink);
    --surface: var(--ink);
    --field: rgba(247, 245, 240, 0.06);
    --text: #dedcd7;
    --muted: #a3a29d;
    --line: rgba(247, 245, 240, 0.16);
    --head: var(--paper);
    --link: var(--tint);
    --btn-bg: var(--action);
    --btn-fg: var(--ink);
    --btn-bg-hover: var(--tint);
    --soft: rgba(247, 245, 240, 0.07);
    --danger: #f08b7d;
    --danger-soft: #3a211d;
    --warn: #f0c46a;
    --warn-soft: #362c17;
    --focus: var(--tint);
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--head); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); color: var(--text); padding: 8px 12px; z-index: 100; border-radius: 8px; }

/* --- Cabeçalho, rodapé e marca ------------------------------------------------------------------------------- */
header.site { padding: 18px 16px; border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--head); text-decoration: none; white-space: nowrap; font-size: 1.15rem; line-height: 1; }
.logo:hover { color: var(--head); text-decoration: none; }
.logo .logo-name { font-weight: 800; letter-spacing: -0.03em; }
.logo .logo-sub { font-weight: 600; letter-spacing: -0.01em; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line); }
nav.top { display: flex; flex-wrap: wrap; gap: 4px 20px; }
nav.top a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
nav.top a:hover { color: var(--head); text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: var(--wide); }
main { padding: 8px 0 56px; }

footer.site { margin-top: 48px; padding: 36px 16px 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
footer.site .foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
footer.site .foot-title { margin: 0 0 8px; font-weight: 800; color: var(--head); letter-spacing: -0.01em; }
footer.site p { margin: 0 0 8px; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin: 4px 0; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--head); }
footer.site .foot-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.86rem; }
@media (max-width: 720px) { footer.site .foot-grid { grid-template-columns: minmax(0, 1fr); } }

/* --- Texto ------------------------------------------------------------------------------------------------------ */
h1, h2, h3, h4 { color: var(--head); }
h1 { font-size: clamp(2rem, 5.4vw, 3.15rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; margin: 0.7em 0 0.4em; text-wrap: balance; }
h2 { font-size: 1.45rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; margin: 1.8em 0 0.5em; }
h3 { font-size: 1.12rem; font-weight: 700; margin: 1.4em 0 0.4em; letter-spacing: -0.01em; }
h4 { font-size: 1rem; margin: 1.1em 0 0.3em; }
p.lead { font-size: 1.18rem; line-height: 1.55; color: var(--muted); max-width: 40rem; }
.muted { color: var(--muted); }
small, .small { font-size: 0.88rem; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--head); }
.kicker::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot); flex: none; }

/* --- Cartões e formulários -------------------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin: 16px 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

form .field { margin: 14px 0; }
label { display: block; font-weight: 700; margin-bottom: 6px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.9rem; }
input[type="email"], input[type="tel"], input[type="text"], input[type="number"], textarea, select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 1px; border-color: var(--action); }
textarea { min-height: 7rem; resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px 12px; margin: 18px 0; }
legend { font-weight: 800; padding: 0 8px; color: var(--head); letter-spacing: -0.01em; }
/* Dentro de um cartão a moldura do cartão já agrupa: cada pergunta vira um título com respiro, sem caixa dentro da caixa. */
.card fieldset { border: 0; border-radius: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
.card legend { padding: 0; margin-bottom: 8px; font-size: 1.02rem; }
.choice { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin: 9px 0; cursor: pointer; }
.choice input { margin-top: 0.38em; width: 1.1em; height: 1.1em; flex: none; accent-color: var(--action); }
.error { color: var(--danger); font-size: 0.92rem; margin-top: 4px; }
[aria-invalid="true"] { border-color: var(--danger); }

button, .button {
  display: inline-block;
  font: inherit;
  font-weight: 800;
  letter-spacing: -0.005em;
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
button:hover, .button:hover { background: var(--btn-bg-hover); color: var(--btn-fg); text-decoration: none; }
button:active, .button:active { transform: translateY(1px); }
button[disabled] { opacity: 0.55; cursor: not-allowed; }
button.secondary { background: transparent; color: var(--link); border: 1px solid currentColor; }
button.secondary:hover { background: var(--soft); color: var(--head); }
button.danger { background: var(--danger); color: #fff; }
button.link { background: none; color: var(--link); padding: 0; font-weight: 700; text-decoration: underline; }

.notice { border-radius: 12px; padding: 13px 16px; margin: 14px 0; background: var(--soft); }
.notice.warn { background: var(--warn-soft); color: var(--text); }
.notice.error { background: var(--danger-soft); }
.badge { display: inline-block; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.02em; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--head); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.block { background: var(--danger-soft); color: var(--danger); }
.badge.ad { border: 1px solid var(--dot); background: transparent; text-transform: uppercase; letter-spacing: 0.1em; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { margin: 12px 0; min-height: 0; }
.hidden { display: none !important; }
/* O atributo hidden precisa vencer o display de botões, cartões e avisos (sem isto, button[hidden] continua na tela). */
[hidden] { display: none !important; }

/* --- Página inicial --------------------------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  margin: 20px 0 0;
  padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 56px);
  border-radius: 28px;
  color: var(--paper);
  background:
    radial-gradient(72% 60% at 100% 100%, rgba(36, 143, 109, 0.38), rgba(36, 143, 109, 0) 64%),
    radial-gradient(52% 40% at 0% 0%, rgba(36, 143, 109, 0.12), rgba(36, 143, 109, 0) 62%),
    var(--ink);
}
.hero .kicker { color: var(--paper); }
.hero .kicker::before { background: var(--action); }
.hero h1 { color: var(--paper); margin-top: 0.5em; max-width: 16ch; }
.hero p.lead { color: rgba(247, 245, 240, 0.74); }
.hero a { color: var(--tint); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 32px 48px; align-items: center; }
.hero .card { margin: 0; color: var(--text); background: var(--surface); border-color: transparent; }
.hero .card h2 { color: var(--head); }
.hero .card a { color: var(--link); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero .card { border-color: var(--line); background: rgba(20, 20, 20, 0.6); } }
@media (max-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero h1 { max-width: none; } }

.features { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; counter-reset: feat; }
.features li { counter-increment: feat; padding: 22px 0 20px; border-top: 1px solid var(--line); }
.features li::before { content: counter(feat, decimal-leading-zero); display: block; font-size: 2.2rem; line-height: 1; font-weight: 500; letter-spacing: -0.05em; color: var(--dot); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.features strong { display: block; color: var(--head); font-size: 1.08rem; letter-spacing: -0.01em; margin-bottom: 2px; }
@media (max-width: 640px) { .features { grid-template-columns: minmax(0, 1fr); } }

.channels { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.channels a { display: inline-block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-weight: 700; text-decoration: none; color: var(--head); }
.channels a:hover { background: var(--soft); text-decoration: none; }
footer.site .channels a { color: var(--head); font-weight: 600; font-size: 0.9rem; padding: 6px 14px; }

/* --- Publicidade (a chamada de venda do Naturally Go) ----------------------------------------------------------- */
.ad-block { margin: 28px 0; padding: 24px 26px 26px; border: 1px solid var(--line); border-left: 4px solid var(--action); border-radius: var(--radius); background: var(--soft); }
.ad-block .ad-kicker { margin: 0 0 10px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--head); display: flex; align-items: center; gap: 10px; }
.ad-block .ad-kicker::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--action); }
.ad-block .ad-title { margin: 0 0 6px; font-size: 1.4rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.025em; color: var(--head); }
.ad-block .ad-pitch { margin: 0 0 16px; color: var(--text); }
.ad-block p:last-child { margin-bottom: 0; }

/* --- Artigos, edições e listas ---------------------------------------------------------------------------------- */
article.post h1 { margin-bottom: 0.2em; }
article.post .meta { color: var(--muted); font-size: 0.92rem; }
article.post ul, article.post ol { padding-left: 1.3em; }
article.post hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.sources li { margin: 6px 0; overflow-wrap: anywhere; }
.list-items { list-style: none; padding: 0; }
.list-items li { border-bottom: 1px solid var(--line); padding: 16px 0; }
.list-items a { font-weight: 800; letter-spacing: -0.01em; text-decoration: none; font-size: 1.08rem; }
.list-items a:hover { text-decoration: underline; }
.list-items p { margin: 4px 0 0; color: var(--muted); }
.ai-note { font-size: 0.9rem; }

.result { font-size: 1.05rem; }
.result .big { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--head); }
table.ranges { width: 100%; border-collapse: collapse; margin: 8px 0; }
table.ranges th, table.ranges td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.ranges td:last-child { white-space: nowrap; }
ol.steps li { margin: 4px 0; font-variant-numeric: tabular-nums; }

/* --- Revisão ---------------------------------------------------------------------------------------------------- */
.review-item { border-left: 4px solid var(--line); }
.review-item.approved { border-left-color: var(--action); }
.review-item.blocked { border-left-color: var(--danger); }
.review-item header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.review-item .preview { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 8px; }
.review-item .delivery { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.9rem; }
.flags li { margin: 6px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.slides figure { margin: 0; }
.slides figcaption { font-size: 0.8rem; color: var(--muted); }

/* --- Chat ------------------------------------------------------------------------------------------------------- */
.chat-launcher { position: fixed; right: 16px; bottom: 16px; z-index: 50; box-shadow: 0 8px 28px rgba(20, 20, 20, 0.28); }
.chat-panel {
  position: fixed; right: 16px; bottom: 76px; z-index: 50;
  width: min(390px, calc(100vw - 32px)); max-height: min(580px, calc(100vh - 110px));
  display: flex; flex-direction: column;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 60px rgba(20, 20, 20, 0.28); overflow: hidden;
}
.chat-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chat-head strong { display: block; color: var(--head); letter-spacing: -0.01em; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 88%; padding: 9px 13px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--btn-bg); color: var(--btn-fg); }
.bubble.me a { color: inherit; }
.bubble.bot { align-self: flex-start; background: var(--soft); }
.bubble.sys { align-self: center; background: none; color: var(--muted); font-size: 0.85rem; text-align: center; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 2.6rem; max-height: 7rem; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .card { padding: 18px; }
  header.site { padding: 14px 0; }
  nav.top { gap: 4px 14px; }
  .ad-block { padding: 20px; }
}

/* No celular, a conversa ocupa a tela inteira (como um app de mensagens) e o botão de abrir some enquanto ela está aberta. */
@media (max-width: 600px) {
  .chat-panel { inset: 0; width: auto; max-height: none; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .chat-launcher[aria-expanded="true"] { display: none; }
  .chat-form { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
