/* =====================================================================
   Portal da Nutrição — estilos principais
   Mobile first: os estilos base valem para celular; @media (min-width) amplia para tablet/desktop.
   Paleta aprovada: azul-marinho INVEXUS (#071135) + verde-folha, ajustada à logomarca (verde-floresta #233e30 e dourado #c8a96a).
   Todas as combinações texto/fundo passam no contraste WCAG AA (mín. 4,5:1).
   ===================================================================== */

/* ---------- 1. Tokens (cores, fontes, espaçamentos) ---------- */
:root {
	--navy-900: #071135;   /* Azul INVEXUS: títulos, rodapé, seção escura */
	--navy-700: #142463;
	--navy-100: #e7eaf5;
	--forest:    #233e30;  /* Verde-floresta da logomarca */
	--gold:      #c8a96a;  /* Dourado das folhas da logomarca (usar sobre fundo escuro) */
	--gold-700:  #85642a;  /* Dourado escuro para texto sobre fundo claro (contraste 5,2:1) */
	--green-700: #2b6544;  /* Botões (texto branco: contraste 6,9:1) */
	--green-600: #347a52;
	--green-400: #5cc287;  /* Destaques sobre fundo escuro */
	--green-50:  #eef7f1;  /* Fundo de seções alternadas */
	--ink:       #1b2433;  /* Texto padrão (contraste 15:1 no branco) */
	--muted:     #535d6e;  /* Texto secundário (contraste 6,5:1) */
	--line:      #dfe4ea;
	--bg:        #ffffff;
	--whatsapp:  #128c4b;

	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--radius: 14px;
	--radius-sm: 8px;
	--shadow: 0 6px 24px rgba(7, 17, 53, .08);
	--container: 1180px;
	--space: clamp(56px, 8vw, 96px);
}

/* Fonte Inter opcional: para usá-la, coloque Inter-Variable.woff2 em assets/fonts/ e descomente.
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
*/

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-underline-offset: 3px; }
a:hover { color: var(--navy-900); }
h1, h2, h3 { color: var(--navy-900); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding: 0; margin: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--green-400); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }
.container--narrow { max-width: 820px; }

/* ---------- 3. Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.btn .icon { width: 20px; height: 20px; }
.btn--primary { background: var(--green-700); color: #fff; }
.btn--primary:hover { background: var(--navy-900); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--navy-900); border-color: var(--navy-900); }
.btn--ghost:hover { background: var(--navy-900); color: #fff; }
.btn--whatsapp { background: var(--whatsapp); color: #fff; }
.btn--whatsapp:hover { background: #0d6e3a; color: #fff; }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: .95rem; }
.btn--block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- 4. Cabeçalho e menu ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy-900); }
.brand__mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--forest); color: var(--gold); font-weight: 800; font-size: .9rem; }
.brand__name { font-size: 1.1rem; line-height: 1.1; }
.brand__img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }

.nav-toggle { display: inline-grid; place-items: center; width: 48px; height: 48px; border: 0; background: none; cursor: pointer; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; display: block; width: 24px; height: 2px; background: var(--navy-900); border-radius: 2px; transition: transform .2s; position: relative; }
.nav-toggle__bar::before { position: absolute; top: -7px; }
.nav-toggle__bar::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

.nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 20px; display: none; }
.nav.is-open { display: block; }
.nav__list a { display: block; padding: 12px 4px; color: var(--navy-900); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
.nav__list a:hover { color: var(--green-700); }
.nav__list .sub-menu { padding-left: 16px; }
.nav__cta { margin-top: 16px; width: 100%; }

@media (min-width: 1024px) {
	.nav-toggle { display: none; }
	.nav { position: static; display: flex !important; align-items: center; gap: 24px; padding: 0; border: 0; background: none; }
	.nav__list { display: flex; gap: 4px; }
	.nav__list a { border: 0; padding: 8px 12px; border-radius: 999px; }
	.nav__list a:hover { background: var(--green-50); }
	.nav__list .sub-menu { display: none; }
	.nav__cta { margin: 0; width: auto; }
}

/* ---------- 5. Seções e títulos ---------- */
.section { padding: var(--space) 0; }
.section--tint { background: var(--green-50); }
.section--dark { background: var(--navy-900); color: #dfe4f4; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark a:not(.btn) { color: var(--green-400); }
.section__head { max-width: 680px; margin-bottom: 40px; }
.section__head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green-700); margin-bottom: 12px; }
.eyebrow--light { color: var(--gold); }
.lead { font-size: 1.125rem; color: var(--muted); }
.section--dark .lead, .section--dark .muted { color: #c3cbe3; }
.hl { color: var(--green-700); }
.split { display: grid; gap: 40px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; } }

/* ---------- 6. Hero ---------- */
.hero { padding: clamp(48px, 8vw, 104px) 0; background: radial-gradient(1200px 500px at 90% -10%, var(--green-50), transparent 60%), linear-gradient(180deg, #fff, #f8fbf9); overflow: hidden; }
.hero__inner { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero__inner { grid-template-columns: 1.15fr .85fr; } }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: .95rem; }
.hero__trust li { display: inline-flex; align-items: center; gap: 6px; }
.hero__trust .icon { width: 18px; height: 18px; color: var(--green-700); }
.hero__art { position: relative; min-height: 280px; display: grid; place-items: center; }
.hero__blob { position: absolute; inset: 0; margin: auto; width: min(380px, 90%); aspect-ratio: 1; border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; background: linear-gradient(145deg, var(--navy-900), var(--forest)); opacity: .97; }
.hero__chips { position: relative; display: grid; gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: 10px; background: #fff; color: var(--navy-900); font-weight: 700; padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow); }
.chip .icon { color: var(--gold-700); width: 20px; height: 20px; }
.chip:nth-child(even) { transform: translateX(28px); }

/* ---------- 7. Grades ---------- */
.grid { display: grid; gap: 20px; }
.grid--goals { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--posts { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* Objetivos */
.goal { display: flex; flex-direction: column; gap: 8px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.goal:hover { border-color: var(--green-600); box-shadow: var(--shadow); transform: translateY(-3px); color: var(--ink); }
.goal__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--green-50); color: var(--green-700); }
.goal__title { margin: 8px 0 0; }
.goal p { color: var(--muted); margin: 0; }
.goal__more { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--green-700); }
.goal__more .icon { width: 18px; height: 18px; }

/* Abas de filtro */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 28px; scrollbar-width: thin; }
.tab { flex: 0 0 auto; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--navy-900); font: inherit; font-weight: 600; cursor: pointer; }
.tab[aria-pressed="true"] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

/* Card de produto */
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card[hidden] { display: none; }
.card__media { position: relative; aspect-ratio: 1; background: #f4f6f8; display: grid; place-items: center; }
.card__media img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.card__placeholder { color: var(--green-600); }
.card__placeholder .icon { width: 56px; height: 56px; }
.card__badge { position: absolute; top: 12px; left: 12px; background: var(--forest); color: var(--gold); font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px; flex: 1; }
.card__title { font-size: 1.05rem; margin: 0; }
.card__text { color: var(--muted); font-size: .95rem; margin: 0; }
.card__benefits li { display: flex; gap: 8px; font-size: .92rem; padding: 2px 0; }
.card__benefits .icon { flex: 0 0 18px; width: 18px; height: 18px; color: var(--green-700); margin-top: 3px; }
.card__cta { margin-top: auto; }

.disclosure { margin-top: 28px; font-size: .85rem; color: var(--muted); }
.empty { padding: 32px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; background: #fff; }
.admin-hint { font-size: .85rem; background: #fff8e1; padding: 12px; border-radius: var(--radius-sm); }

/* Diferenciais */
.features { display: grid; gap: 16px; }
@media (min-width: 600px) { .features { grid-template-columns: 1fr 1fr; } }
.feature { display: flex; gap: 14px; padding: 20px; border-radius: var(--radius); background: var(--green-50); }
.feature h3 { margin-bottom: 4px; font-size: 1rem; }
.feature p { margin: 0; font-size: .95rem; color: var(--muted); }
.feature__icon { flex: 0 0 auto; color: var(--gold-700); }

/* Card de artigo */
.post-card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.post-card__link { display: block; color: inherit; text-decoration: none; height: 100%; }
.post-card__media { aspect-ratio: 16 / 9; background: var(--green-50); display: grid; place-items: center; overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover img { transform: scale(1.04); }
.post-card__body { padding: 20px; }
.post-card__body p { color: var(--muted); margin: 0; font-size: .95rem; }
.post-card__title { margin: 4px 0 8px; }
.post-card__meta { font-size: .85rem; color: var(--muted); margin: 0; }

/* FAQ */
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary h3 { display: inline; margin: 0; font-size: 1.05rem; }
.faq__item summary::after { content: "+"; position: absolute; right: 8px; top: 14px; font-size: 1.6rem; color: var(--green-700); transition: transform .2s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { color: var(--muted); padding-bottom: 20px; margin: 0; }

/* ---------- 8. Formulário ---------- */
.form { background: #fff; color: var(--ink); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow); }
.form a { color: var(--green-700) !important; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { font-weight: 600; font-size: .95rem; color: var(--navy-900); }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; color: var(--ink); background: #fff; border: 1px solid #b9c1cc; border-radius: var(--radius-sm); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green-700); outline: 3px solid rgba(35, 131, 75, .2); }
.field [aria-invalid="true"] { border-color: #b42318; }
.field__error { color: #b42318; font-size: .85rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; margin: 4px 0 20px; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: 0 0 auto; accent-color: var(--green-700); }
.form__note { font-size: .82rem; color: var(--muted); margin: 12px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 600; }
.alert--success { background: #e6f4ea; color: #14532d; }
.alert--error { background: #fdecea; color: #8a1c12; }

/* ---------- 9. Páginas internas ---------- */
.page-hero { padding: clamp(40px, 6vw, 72px) 0 24px; background: var(--green-50); }
.prose { font-size: 1.06rem; }
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 1em; list-style: revert; }
.prose img, .article__cover { border-radius: var(--radius); margin: 24px 0; }
.health-note { margin-top: 40px; padding: 16px; border-left: 4px solid var(--green-600); background: var(--green-50); font-size: .92rem; }
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); text-decoration: none; }
.pagination .current { background: var(--navy-900); color: #fff; }

/* ---------- 10. Rodapé ---------- */
.site-footer { background: #050c26; color: #c3cbe3; padding: 64px 0 24px; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gold); }
.site-footer .brand { color: #fff; margin-bottom: 16px; }
.site-footer__grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer__title { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.site-footer li { padding: 4px 0; }
.social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.social a:hover { background: var(--green-700); color: #fff; }
.social .icon { width: 20px; height: 20px; }
.site-footer__legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .82rem; color: #a9b3d1; }

/* ---------- 11. WhatsApp flutuante ---------- */
.whatsapp-fab { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--whatsapp); color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); transition: transform .2s; }
.whatsapp-fab:hover { color: #fff; transform: scale(1.06); }
.whatsapp-fab .icon { width: 30px; height: 30px; }

/* ---------- 12. Banner de cookies ---------- */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100; }
.cookie[hidden] { display: none; }
.cookie__box { max-width: 560px; background: #fff; color: var(--ink); border-radius: var(--radius); box-shadow: 0 16px 48px rgba(7, 17, 53, .25); padding: 24px; border: 1px solid var(--line); }
.cookie__title { font-size: 1.1rem; }
.cookie p { font-size: .92rem; color: var(--muted); }
.cookie__prefs fieldset { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.switch { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.switch input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green-700); flex: 0 0 auto; }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie__actions .btn { min-height: 44px; padding: 8px 16px; flex: 1 1 auto; }
body.has-cookie-banner .whatsapp-fab { bottom: 16px; visibility: hidden; }
@media (min-width: 768px) { body.has-cookie-banner .whatsapp-fab { visibility: visible; } }
.site-footer .link-btn { color: #fff; }
